optimize compeltion for jobs, complete printenv from environ
part of darcs patch Sat Sep 24 22:46:24 MST 2005 Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
This commit is contained in:
parent
bd803d5168
commit
d51eb49139
|
@ -247,7 +247,11 @@
|
|||
|
||||
(register-plugin!
|
||||
(make-command-plugin "printenv"
|
||||
no-completer
|
||||
(lambda (command to-complete)
|
||||
(completions-for
|
||||
(make-completion-set
|
||||
(map car (env->alist)))
|
||||
(or (to-complete-prefix to-complete) "")))
|
||||
(lambda (command args)
|
||||
(case (length args)
|
||||
((0) (printenv))
|
||||
|
@ -268,13 +272,16 @@
|
|||
0
|
||||
(string->number (car args)))))))
|
||||
|
||||
(define jobs-completion-set
|
||||
(make-completion-set
|
||||
'("running" "ready" "stopped"
|
||||
"output" "waiting-for-input")))
|
||||
|
||||
(register-plugin!
|
||||
(make-command-plugin "jobs"
|
||||
(lambda (command to-complete)
|
||||
(completions-for
|
||||
(make-completion-set
|
||||
'("running" "ready" "stopped"
|
||||
"output" "waiting-for-input"))
|
||||
jobs-completion-set
|
||||
(or (to-complete-prefix to-complete) "")))
|
||||
(lambda (command args)
|
||||
(let ((selectors
|
||||
|
|
Loading…
Reference in New Issue