From 3eef6e91274f2e07bd566f206e89d9b0b9c45fb9 Mon Sep 17 00:00:00 2001 From: Felix Neumärker Date: Fri, 18 Jan 2019 23:20:38 +0100 Subject: zsh-completion: _rc-service support extra actions - use rc-service describe to get action list This is for #285. --- zsh-completion/_rc-service | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'zsh-completion/_rc-service') 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 } -- cgit v1.2.3