zsh-completion: _rc-service support extra actions
- use rc-service <service> describe to get action list This is for #285.
This commit is contained in:
parent
77f09900a2
commit
3eef6e9127
@ -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
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user