From 227b71e67d19f73128862d20aac714537c8517df Mon Sep 17 00:00:00 2001 From: Sebastien Luttringer Date: Mon, 8 Aug 2011 21:38:56 +0200 Subject: 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 --- zsh-completion | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'zsh-completion') 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')))" ;; -- cgit v1.2.3