aboutsummaryrefslogtreecommitdiffstats
path: root/misc/zsh_completion/git-bug
blob: c2ed9872aae98af3cce28fd78516939abc6c33bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#compdef git-bug

_arguments \
  '1: :->level1' \
  '2: :->level2' \
  '3: :_files'
case $state in
  level1)
    case $words[1] in
      git-bug)
        _arguments '1: :(add bridge commands comment deselect label ls ls-id ls-label pull push select show status termui title user version webui)'
      ;;
      *)
        _arguments '*: :_files'
      ;;
    esac
  ;;
  level2)
    case $words[2] in
      bridge)
        _arguments '2: :(configure pull rm)'
      ;;
      comment)
        _arguments '2: :(add)'
      ;;
      label)
        _arguments '2: :(add rm)'
      ;;
      status)
        _arguments '2: :(close open)'
      ;;
      title)
        _arguments '2: :(edit)'
      ;;
      user)
        _arguments '2: :(adopt create ls)'
      ;;
      *)
        _arguments '*: :_files'
      ;;
    esac
  ;;
  *)
    _arguments '*: :_files'
  ;;
esac