about summary refs log tree commit diff
path: root/Completion/Zsh/Function/_vcs_info
blob: fdb28de6ad1292ddd408e76575d46a6b9804c041 (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
#compdef vcs_info_hookadd vcs_info_hookdel

local -a hook_types=(
  gen-applied-string
  gen-hg-bookmark-string
  gen-mqguards-string
  gen-unapplied-string
  no-vcs
  post-backend
  post-quilt
  pre-addon-quilt
  pre-get-data
  set-branch-format
  set-hgrev-format
  set-message
  set-patch-format
  start-up
)

local -a specs
case $service in
  (vcs_info_hookdel)
    specs=( '-a[remove all occurrences, not just the first]' )
    ;;
esac

# TODO: for vcs_info_hookdel complete only functions installed for that hook
_arguments : \
  $specs \
  ":hook type:($hook_types)" \
  '*:hook function:_vcs_info_hooks'