diff options
author | Felix Neumärker <xdch47@posteo.de> | 2019-01-18 23:20:38 +0100 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2019-01-21 17:41:59 -0600 |
commit | 3eef6e91274f2e07bd566f206e89d9b0b9c45fb9 (patch) | |
tree | 131266c1488f700704f9b7197880b982026a91a5 /zsh-completion | |
parent | 77f09900a2e0eeb1475e9ee404b6e7ff76ff8e9d (diff) |
zsh-completion: _rc-service support extra actions
- use rc-service <service> describe to get action list
This is for #285.
Diffstat (limited to 'zsh-completion')
-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 } |