tmuxinator.zsh 390 B

123456789101112131415161718192021
  1. #!/usr/bin/env zsh
  2. # Completion of tmuxinator project names
  3. if [[ ! -o interactive ]]; then
  4. return
  5. fi
  6. compctl -K _tmuxinator tmuxinator mux
  7. _tmuxinator() {
  8. local words completions
  9. read -cA words
  10. if [ "${#words}" -eq 2 ]; then
  11. completions="$(tmuxinator commands)"
  12. else
  13. completions="$(tmuxinator completions ${words[2,-2]})"
  14. fi
  15. reply=("${(ps:\n:)completions}")
  16. }