about summary refs log tree commit diff
path: root/Completion/Cvs/_cvs_command
blob: e56f547046f24876128c54050d236ec3fbeab5c4 (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
#autoload

typeset -A cmds
cmds=(add " ad new "          admin " adm rcs "       annotate " ann "
      checkout " co get "     commit " ci com "       diff " di dif "
      edit ""                 editors ""              export " exp ex "
      history " hi his "      import " im imp "       init ""
      log " lo rlog "         login " logon lgn "     logout ""
      rdiff " patch pa "      release " re rel "      remove " rm delete "
      status " st stat "      rtag " rt rfreeze "     tag " ta freeze "
      unedit ""               update " up upd "       watch ""
      watchers "")

if (( CURRENT == 1 )); then
  compadd ${(k)cmds} || compadd ${(kv)=cmds}
else
  case "${${(k)cmds[(R)* $words[1] *]}:-$words[1]}" in
    add) _cvs_add;;
    admin) _cvs_admin;;
    annotate) _cvs_annotate;;
    checkout) _cvs_checkout;;
    commit) _cvs_commit;;
    diff) _cvs_diff;;
    edit) _cvs_edit;;
    editors) _cvs_editors;;
    export) _cvs_export;;
    history) _cvs_history;;
    import) _cvs_import;;
    init) _cvs_init;;
    log) _cvs_log;;
    login) _cvs_login;;
    logout) _cvs_logout;;
    rdiff) _cvs_rdiff;;
    release) _cvs_release;;
    remove) _cvs_remove;;
    status) _cvs_status;;
    rtag) _cvs_rtag;;
    tag) _cvs_tag;;
    unedit) _cvs_unedit;;
    update) _cvs_update;;
    watch) _cvs_watch;;
    watchers) _cvs_watchers;;
    *) _message "unknown cvs command: $words[1]";;
  esac
fi