diff --git a/scheme/std-command.scm b/scheme/std-command.scm index 2cddec8..7064240 100644 --- a/scheme/std-command.scm +++ b/scheme/std-command.scm @@ -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")) + (completions-for + jobs-completion-set (or (to-complete-prefix to-complete) ""))) (lambda (command args) (let ((selectors