_tmuxinator 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #compdef tmuxinator mux
  2. # ------------------------------------------------------------------------------
  3. # Description
  4. # -----------
  5. #
  6. # Completion script for tmuxinator (https://github.com/tmuxinator/tmuxinator)
  7. #
  8. # ------------------------------------------------------------------------------
  9. # Authors
  10. # -------
  11. #
  12. # * Christopher Chow (https://github.com/Soliah)
  13. #
  14. # ------------------------------------------------------------------------------
  15. _tmuxinator() {
  16. local commands projects
  17. commands=(${(f)"$(tmuxinator commands zsh)"})
  18. projects=(${(f)"$(tmuxinator completions start)"})
  19. if (( CURRENT == 2 )); then
  20. _describe -t commands "tmuxinator subcommands" commands
  21. _describe -t projects "tmuxinator projects" projects
  22. elif (( CURRENT == 3)); then
  23. case $words[2] in
  24. copy|debug|delete|open|start)
  25. _arguments '*:projects:($projects)'
  26. ;;
  27. esac
  28. fi
  29. return
  30. }
  31. _tmuxinator
  32. # Local Variables:
  33. # mode: Shell-Script
  34. # sh-indentation: 2
  35. # indent-tabs-mode: nil
  36. # sh-basic-offset: 2
  37. # End:
  38. # vim: ft=zsh sw=2 ts=2 et