Add exit, make cd smarter

This commit is contained in:
mainzelm 2005-05-26 17:39:20 +00:00
parent 93c6d96922
commit f681d13f49
1 changed files with 11 additions and 2 deletions

View File

@ -29,7 +29,10 @@
(make-command-plugin "cd"
no-completer
(lambda (command args)
(chdir (car args)))))
(chdir (resolve-file-name (if (null? args)
"~"
(car args))))
(cwd))))
(register-plugin!
(make-command-plugin "setenv"
@ -49,4 +52,10 @@
(lambda (command args)
(env->alist))))
(register-plugin!
(make-command-plugin "exit"
no-completer
(lambda (command args)
(exit (if (null? args)
0
(string->number (car args)))))))