diff options
-rw-r--r-- | zsh-completion/_rc-service | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/zsh-completion/_rc-service b/zsh-completion/_rc-service index b9976131..1c518fa1 100644 --- a/zsh-completion/_rc-service +++ b/zsh-completion/_rc-service @@ -14,7 +14,12 @@ _rc_actions() { if [[ -n "${opt_args[(i)-e|--exists|-r|--resolve]}" ]] || ! $(rc-service -e $service) ; then _nothing else - _values 'action' stop start restart describe zap + local -a actions=(${(f)"$(rc-service -C $service describe 2>&1)"}) + shift actions + actions=(${actions# \* }) + actions=(${actions/:*}) + actions=(stop start restart describe zap ${actions[@]}) + _describe -V 'action' actions fi } |