diff options
author | Sebastien Luttringer <seblu@seblu.net> | 2011-08-08 21:38:56 +0200 |
---|---|---|
committer | Sebastien Luttringer <seblu@seblu.net> | 2011-08-27 19:17:21 +0200 |
commit | 227b71e67d19f73128862d20aac714537c8517df (patch) | |
tree | 75a675b196077ee9cee427b4d9650468e912bcc3 /zsh-completion | |
parent | 4e573b6b35d4468b4b3856a7784728f75ab2e73a (diff) |
rc.d: handle a set of options
rc.d can now take --started, --stopped, --auto, --noauto as option which
help user to filter list of daemon for all actions
As a corollary list command can now take a list of dameon to display
All kind of arguments can be mixed to obtain the proper output.
zsh and bash completion are updated
Note: Output of help command exit 0 and is no more printed on stderr
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
Diffstat (limited to 'zsh-completion')
-rw-r--r-- | zsh-completion | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/zsh-completion b/zsh-completion index e5c2850..58fdfab 100644 --- a/zsh-completion +++ b/zsh-completion @@ -4,11 +4,10 @@ _rc.d () { local curcontext="$curcontext" state line typeset -A opt_args - _arguments "1: :->action" "*: :->service" - + _arguments "1: :->action" "*: :->service" {-s,--started} {-S,--stopped} {-a,--auto} {-A,--noauto} case $state in action) - _arguments "1:action:(list help start stop restart)" + _arguments "*:action:(list help start stop restart)" ;; service) local action="$words[2]" @@ -18,9 +17,6 @@ _rc.d () { help) _arguments "*: :" ;; - list) - _arguments "2: :(started stopped)" - ;; start) _arguments "*: :($(comm -23 <(echo /etc/rc.d/*(N-*:t)|tr ' ' '\n') <(echo /run/daemons/*(N:t)|tr ' ' '\n')))" ;; |