2019-10-24 19:09:05 +00:00
|
|
|
#compdef tmuxinator mux
|
|
|
|
#autoload
|
|
|
|
|
2019-01-12 15:47:23 +00:00
|
|
|
_tmuxinator() {
|
|
|
|
local commands projects
|
|
|
|
commands=(${(f)"$(tmuxinator commands zsh)"})
|
|
|
|
projects=(${(f)"$(tmuxinator completions start)"})
|
|
|
|
|
|
|
|
if (( CURRENT == 2 )); then
|
|
|
|
_describe -t commands "tmuxinator subcommands" commands
|
|
|
|
_describe -t projects "tmuxinator projects" projects
|
|
|
|
elif (( CURRENT == 3)); then
|
|
|
|
case $words[2] in
|
|
|
|
copy|debug|delete|open|start)
|
|
|
|
_arguments '*:projects:($projects)'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2019-10-24 19:09:05 +00:00
|
|
|
compdef _tmuxinator tmuxinator
|