diff options
author | Sebastien Luttringer <seblu@seblu.net> | 2011-05-23 01:13:57 +0200 |
---|---|---|
committer | Sebastien Luttringer <seblu@seblu.net> | 2011-05-23 01:20:32 +0200 |
commit | 18adeacb36967463330060237725ffbdfd47e2a7 (patch) | |
tree | e60c507fcb94eb9771968fad29ea8b978f7c01a8 /zsh-completion | |
parent | 395803ff628e41940bbaaf5f1ffbcf591b007102 (diff) |
rc.d zsh completion detect running daemons
This patch adds functionalities of bash completions about running demons
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
Diffstat (limited to 'zsh-completion')
-rw-r--r-- | zsh-completion | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/zsh-completion b/zsh-completion index bf8d9d0..f1b7165 100644 --- a/zsh-completion +++ b/zsh-completion @@ -15,14 +15,17 @@ _rc.d () { curcontext="${curcontext%:*:*}:rc.d-${action}:" case $action in - list) + list|help) _arguments "*: :" ;; - help) - _arguments "*: :" + start) + _arguments "*: :($(comm -23 <(echo /etc/rc.d/*(N-*:t)|tr ' ' '\n') <(echo /run/daemons/*(N:t)|tr ' ' '\n')))" + ;; + stop|restart|reload) + _arguments "*: :(/run/daemons/*(N:t))" ;; *) - _arguments "*: :_services" + _arguments "*: :(/etc/rc.d/*(N-*:t))" ;; esac ;; |