zsh-completions/src/_tmuxinator

44 lines
1.0 KiB
Plaintext
Raw Normal View History

2012-07-06 00:46:51 +00:00
#compdef tmuxinator mux
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for tmuxinator (https://github.com/tmuxinator/tmuxinator)
2012-07-06 00:46:51 +00:00
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Christopher Chow (https://github.com/Soliah)
2012-07-06 00:46:51 +00:00
#
# ------------------------------------------------------------------------------
_tmuxinator() {
local commands projects
commands=(${(f)"$(tmuxinator commands zsh)"})
projects=(${(f)"$(tmuxinator completions start)"})
2012-07-06 00:46:51 +00:00
if (( CURRENT == 2 )); then
_describe -t commands "tmuxinator subcommands" commands
_describe -t projects "tmuxinator projects" projects
elif (( CURRENT == 3)); then
2012-07-06 00:46:51 +00:00
case $words[2] in
copy|debug|delete|open|start)
2012-07-06 00:46:51 +00:00
_arguments '*:projects:($projects)'
;;
esac
fi
return
2012-07-06 00:46:51 +00:00
}
_tmuxinator
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et