_tmuxinator 518 B

123456789101112131415161718192021
  1. _tmuxinator() {
  2. local commands projects
  3. commands=(${(f)"$(tmuxinator commands zsh)"})
  4. projects=(${(f)"$(tmuxinator completions start)"})
  5. if (( CURRENT == 2 )); then
  6. _describe -t commands "tmuxinator subcommands" commands
  7. _describe -t projects "tmuxinator projects" projects
  8. elif (( CURRENT == 3)); then
  9. case $words[2] in
  10. copy|debug|delete|open|start)
  11. _arguments '*:projects:($projects)'
  12. ;;
  13. esac
  14. fi
  15. return
  16. }
  17. compdef _tmuxinator tmuxinator mux
  18. alias mux="tmuxinator"