_tmuxinator 526 Bytes
Newer Older
1
2
3
#compdef tmuxinator mux
#autoload

4
5
6
7
_tmuxinator() {
  local commands projects
  commands=(${(f)"$(tmuxinator commands zsh)"})
  projects=(${(f)"$(tmuxinator completions start)"})
Ian Yang's avatar
Ian Yang committed
8

9
10
11
12
13
14
15
16
  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)'
      ;;
Ian Yang's avatar
Ian Yang committed
17
    esac
18
19
20
21
  fi

  return
}
Ian Yang's avatar
Ian Yang committed
22

23
compdef _tmuxinator tmuxinator