added completions for lunchy (https://github.com/mperham/lunchy)
This commit is contained in:
parent
23395d7406
commit
2836b8ead9
|
@ -0,0 +1,35 @@
|
||||||
|
#compdef lunchy
|
||||||
|
|
||||||
|
local state line cmds ret=1
|
||||||
|
|
||||||
|
_arguments -C '1: :->cmds' '*: :->args'
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
cmds)
|
||||||
|
local -a cmds
|
||||||
|
cmds=(
|
||||||
|
'ls:list available agents'
|
||||||
|
'start:start an agent'
|
||||||
|
'stop:stop an agent'
|
||||||
|
'restart:restart an agent'
|
||||||
|
'status:get the status of agent[s]'
|
||||||
|
'install:install an agents plist file'
|
||||||
|
'edit:edit an agent'
|
||||||
|
)
|
||||||
|
_describe -t commands 'lunchy command' cmds && ret=0
|
||||||
|
;;
|
||||||
|
args)
|
||||||
|
case $line[1] in
|
||||||
|
(install)
|
||||||
|
;;
|
||||||
|
(restart|stop)
|
||||||
|
_values 'items' `lunchy status | awk '{print $3}' ` 2>/dev/null && ret=0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_values 'items' `lunchy ls` 2>/dev/null && ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return ret
|
Loading…
Reference in New Issue