diff options
author | Matthew Lemon <lemon@x220.lan> | 2020-09-06 16:48:05 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@x220.lan> | 2020-09-06 16:48:05 +0100 |
commit | e4640e28c8449eea66392052bfab57ce0cdd27f9 (patch) | |
tree | 2be81b55bc37da60599f4e6d434e74a57694962e /tmuxinator.zsh |
first commit
Diffstat (limited to 'tmuxinator.zsh')
-rw-r--r-- | tmuxinator.zsh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tmuxinator.zsh b/tmuxinator.zsh new file mode 100644 index 0000000..40a6964 --- /dev/null +++ b/tmuxinator.zsh @@ -0,0 +1,29 @@ +_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 +} + +compdef _tmuxinator tmuxinator mux +alias mux="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 |