Minor enhancements for printenv/setenv; drop getenv
part of darcs patch Thu Sep 22 21:06:35 EEST 2005 Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
This commit is contained in:
parent
6d3470be25
commit
89766e74db
|
@ -236,19 +236,28 @@
|
|||
(make-command-plugin "setenv"
|
||||
no-completer
|
||||
(lambda (command args)
|
||||
(setenv (car args) (cadr args)))))
|
||||
|
||||
(register-plugin!
|
||||
(make-command-plugin "getenv"
|
||||
no-completer
|
||||
(lambda (command args)
|
||||
(getenv (car args)))))
|
||||
(case (length args)
|
||||
((0) (printenv))
|
||||
((1) (getenv (car args)))
|
||||
((2)
|
||||
(setenv (car args) (cadr args))
|
||||
0)
|
||||
(else
|
||||
(error "too many arguments to setenv" args))))))
|
||||
|
||||
(register-plugin!
|
||||
(make-command-plugin "printenv"
|
||||
no-completer
|
||||
(lambda (command args)
|
||||
(env->alist))))
|
||||
(case (length args)
|
||||
((0) (printenv))
|
||||
((1) (getenv (car args)))
|
||||
(else
|
||||
(error "too many arguments to printenv"
|
||||
args))))))
|
||||
|
||||
(define (printenv)
|
||||
(env->alist))
|
||||
|
||||
(register-plugin!
|
||||
(make-command-plugin "exit"
|
||||
|
|
Loading…
Reference in New Issue