about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-26 11:08:17 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-26 11:08:17 +0000
commita41988aba4fa0e5286278253780804e5e3259629 (patch)
tree889aa81daf12359e99be4f5062a86c44c28d0b48 /Completion
parent54f3a6bd29ea9ebb164a2690ae4792f0ec9290e2 (diff)
downloadzsh-a41988aba4fa0e5286278253780804e5e3259629.tar.gz
zsh-a41988aba4fa0e5286278253780804e5e3259629.tar.xz
zsh-a41988aba4fa0e5286278253780804e5e3259629.zip
Initial revision
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Cvs/_cvs14
-rw-r--r--Completion/Cvs/_cvs_D3
-rw-r--r--Completion/Cvs/_cvs_add7
-rw-r--r--Completion/Cvs/_cvs_admin21
-rw-r--r--Completion/Cvs/_cvs_admin_t7
-rw-r--r--Completion/Cvs/_cvs_annotate8
-rw-r--r--Completion/Cvs/_cvs_bindir3
-rw-r--r--Completion/Cvs/_cvs_checkout11
-rw-r--r--Completion/Cvs/_cvs_command42
-rw-r--r--Completion/Cvs/_cvs_commit9
-rw-r--r--Completion/Cvs/_cvs_diff15
-rw-r--r--Completion/Cvs/_cvs_diff_arg3
-rw-r--r--Completion/Cvs/_cvs_directories8
-rw-r--r--Completion/Cvs/_cvs_edit7
-rw-r--r--Completion/Cvs/_cvs_editor3
-rw-r--r--Completion/Cvs/_cvs_editors6
-rw-r--r--Completion/Cvs/_cvs_export10
-rw-r--r--Completion/Cvs/_cvs_extract_directory_entries3
-rw-r--r--Completion/Cvs/_cvs_extract_file_entries3
-rw-r--r--Completion/Cvs/_cvs_extract_modifiedfile_entries13
-rw-r--r--Completion/Cvs/_cvs_files10
-rw-r--r--Completion/Cvs/_cvs_files_modified10
-rw-r--r--Completion/Cvs/_cvs_files_removed15
-rw-r--r--Completion/Cvs/_cvs_files_unmaintained26
-rw-r--r--Completion/Cvs/_cvs_gzip_level3
-rw-r--r--Completion/Cvs/_cvs_history18
-rw-r--r--Completion/Cvs/_cvs_history_x5
-rw-r--r--Completion/Cvs/_cvs_import13
-rw-r--r--Completion/Cvs/_cvs_init3
-rw-r--r--Completion/Cvs/_cvs_k3
-rw-r--r--Completion/Cvs/_cvs_login3
-rw-r--r--Completion/Cvs/_cvs_m3
-rw-r--r--Completion/Cvs/_cvs_modules12
-rw-r--r--Completion/Cvs/_cvs_rdiff10
-rw-r--r--Completion/Cvs/_cvs_release6
-rw-r--r--Completion/Cvs/_cvs_remove6
-rw-r--r--Completion/Cvs/_cvs_revisions3
-rw-r--r--Completion/Cvs/_cvs_root11
-rw-r--r--Completion/Cvs/_cvs_setup_allentries9
-rw-r--r--Completion/Cvs/_cvs_setup_direntries8
-rw-r--r--Completion/Cvs/_cvs_setup_modentries9
-rw-r--r--Completion/Cvs/_cvs_setup_prefix9
-rw-r--r--Completion/Cvs/_cvs_status6
-rw-r--r--Completion/Cvs/_cvs_tag8
-rw-r--r--Completion/Cvs/_cvs_tempdir3
-rw-r--r--Completion/Cvs/_cvs_unedit6
-rw-r--r--Completion/Cvs/_cvs_update12
-rw-r--r--Completion/Cvs/_cvs_user_variable7
-rw-r--r--Completion/Cvs/_cvs_watch21
-rw-r--r--Completion/Cvs/_cvs_watchers6
50 files changed, 460 insertions, 0 deletions
diff --git a/Completion/Cvs/_cvs b/Completion/Cvs/_cvs
new file mode 100644
index 000000000..b064ee2df
--- /dev/null
+++ b/Completion/Cvs/_cvs
@@ -0,0 +1,14 @@
+#compdef cvs
+
+# "+Qqrwtnlvb:T:e:d:Hfz:s:xa"
+_arguments -s \
+  -{a,f,H,l,n,Q,q,r,t,v,w,x} \
+  '--version' '--help' '--help-commands' '--help-synonyms' '--help-options' \
+  '--allow-root=-:rootdir:_files -/' \
+  '-b+:bindir:_cvs_bindir' \
+  '-T+:temporary directory:_cvs_tempdir' \
+  '-d+:cvsroot:_cvs_root' \
+  '-e+:editor:_cvs_editor' \
+  '-s+:user variable:_cvs_user_variable' \
+  '-z:gzip level:_cvs_gzip_level' \
+  '*::cvs command:_cvs_command'
diff --git a/Completion/Cvs/_cvs_D b/Completion/Cvs/_cvs_D
new file mode 100644
index 000000000..be5309790
--- /dev/null
+++ b/Completion/Cvs/_cvs_D
@@ -0,0 +1,3 @@
+#autoload
+
+compadd "$@" today yesterday week\ ago month\ ago
diff --git a/Completion/Cvs/_cvs_add b/Completion/Cvs/_cvs_add
new file mode 100644
index 000000000..7af7c2ed0
--- /dev/null
+++ b/Completion/Cvs/_cvs_add
@@ -0,0 +1,7 @@
+#autoload
+
+# "+k:m:"
+_arguments -s \
+  '-k+:keyword substitution:_cvs_k' \
+  '-m+:message:_cvs_m' \
+  '*:file:_cvs_files_unmaintained' \
diff --git a/Completion/Cvs/_cvs_admin b/Completion/Cvs/_cvs_admin
new file mode 100644
index 000000000..061242917
--- /dev/null
+++ b/Completion/Cvs/_cvs_admin
@@ -0,0 +1,21 @@
+#autoload
+
+# "+ib::c:a:A:e:l::u::LUn:N:m:o:s:t::IqxV:k:"
+_arguments -s \
+  -{i,L,U,I,q,x} \
+  '-b-:default branch:(1.1.1)' \
+  '-c+:comment leader (not used):' \
+  '-a+:login names (not work with CVS):' \
+  '-A+:access list to append (not work with CVS):' \
+  '-e+:access list to erase (not work with CVS):' \
+  '-l-:revision to lock:' \
+  '-u-:revision to unlock:' \
+  '-n+:symbolic-name[\:revision]:' \
+  '-N+:symbolic-name[\:revision]:' \
+  '-m+:revision\:msg:' \
+  '-o+:range to delete:' \
+  '-s+:state[\:revision]:' \
+  '-t-:descriptive text:_cvs_admin_t' \
+  '-V+:version (obsolete):' \
+  '-k+:keyword substitution:_cvs_k' \
+  '*:file:_cvs_files'
diff --git a/Completion/Cvs/_cvs_admin_t b/Completion/Cvs/_cvs_admin_t
new file mode 100644
index 000000000..57b5c65e2
--- /dev/null
+++ b/Completion/Cvs/_cvs_admin_t
@@ -0,0 +1,7 @@
+#autoload
+
+if compset -P -; then
+  _message 'descriptive text'
+else
+  _files "$@"
+fi
diff --git a/Completion/Cvs/_cvs_annotate b/Completion/Cvs/_cvs_annotate
new file mode 100644
index 000000000..694105e93
--- /dev/null
+++ b/Completion/Cvs/_cvs_annotate
@@ -0,0 +1,8 @@
+#autoload
+
+# "+lr:D:fR"
+_arguments -s \
+  -{l,f,R} \
+  '-r+:tag:_cvs_revisions' \
+  '-D+:date:_cvs_D' \
+  '*:file:_cvs_files'
diff --git a/Completion/Cvs/_cvs_bindir b/Completion/Cvs/_cvs_bindir
new file mode 100644
index 000000000..bb08098ee
--- /dev/null
+++ b/Completion/Cvs/_cvs_bindir
@@ -0,0 +1,3 @@
+#autoload
+
+compadd "$@" /usr/local/bin || _files "$@" -/
diff --git a/Completion/Cvs/_cvs_checkout b/Completion/Cvs/_cvs_checkout
new file mode 100644
index 000000000..d8cfabafb
--- /dev/null
+++ b/Completion/Cvs/_cvs_checkout
@@ -0,0 +1,11 @@
+#autoload
+
+# "+ANnk:d:flRpQqcsr:D:j:P"
+_arguments -s \
+  -{A,N,n,f,l,R,q,c,s,P} \
+  '-k+:keyword substitution:_cvs_k' \
+  '-d+:directory:_files -/' \
+  '-r+:tag:_cvs_revisions' \
+  '-D+:date:_cvs_D' \
+  '-j+:tag:_cvs_revisions' \
+  '*:module:_cvs_modules'
diff --git a/Completion/Cvs/_cvs_command b/Completion/Cvs/_cvs_command
new file mode 100644
index 000000000..837c7cbb1
--- /dev/null
+++ b/Completion/Cvs/_cvs_command
@@ -0,0 +1,42 @@
+#autoload
+
+typeset -A commands
+commands=(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             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)commands} || compadd ${(kv)=commands}
+else
+  case "$words[1]" in
+    add|ad|new) _cvs_add;;
+    admin|adm|rcs) _cvs_admin;;
+    annotate|ann) _cvs_annotate;;
+    checkout|co|get) _cvs_checkout;;
+    commit|ci|com) _cvs_commit;;
+    diff|di|dif) _cvs_diff;;
+    edit) _cvs_edit;;
+    editors) _cvs_editors;;
+    export|exp|ex) _cvs_export;;
+    history|hi|his) _cvs_history;;
+    import|im|imp) _cvs_import;;
+    init) _cvs_init;;
+    login|logon|lgn|logout) _cvs_login;;
+    rdiff|patch|pa) _cvs_rdiff;;
+    release|re|rel) _cvs_release;;
+    remove|rm|delete) _cvs_remove;;
+    status|st|stat) _cvs_status;;
+    tag|ta|freeze) _cvs_tag;;
+    unedit) _cvs_unedit;;
+    update|up|upd) _cvs_update;;
+    watch) _cvs_watch;;
+    watchers) _cvs_watchers;;
+    *) _message "unknown cvs command: $words[1]";;
+  esac
+fi
diff --git a/Completion/Cvs/_cvs_commit b/Completion/Cvs/_cvs_commit
new file mode 100644
index 000000000..886a4c4b8
--- /dev/null
+++ b/Completion/Cvs/_cvs_commit
@@ -0,0 +1,9 @@
+#autoload
+
+# "+nlRm:fF:r:"
+_arguments -s \
+  -{n,l,R,f} \
+  '-m+:message:_cvs_m' \
+  '-F+:log message file:_files' \
+  '-r+:tag:_cvs_revisions' \
+  '*:file:_cvs_files_modified'
diff --git a/Completion/Cvs/_cvs_diff b/Completion/Cvs/_cvs_diff
new file mode 100644
index 000000000..8f509a694
--- /dev/null
+++ b/Completion/Cvs/_cvs_diff
@@ -0,0 +1,15 @@
+#autoload
+
+# "+abcdefhilnpstuw0123456789BHNRC:D:F:I:L:U:V:W:k:r:"
+_arguments -s \
+  -{a,b,c,d,e,f,h,i,l,n,p,s,t,u,w,0,1,2,3,4,5,6,7,8,9,B,H,N,R} \
+  '-C:lines:' \
+  '-D+:date:_cvs_D' \
+  '-F+:regex:' \
+  '-I+:regex:' \
+  '*-L+:label:' \
+  '-U:lines:' \
+  '-W:columns:' \
+  '-k+:keyword substitution:_cvs_k' \
+  '-r+:tag:_cvs_revisions' \
+  '*:file:_cvs_diff_arg'
diff --git a/Completion/Cvs/_cvs_diff_arg b/Completion/Cvs/_cvs_diff_arg
new file mode 100644
index 000000000..badac5f0d
--- /dev/null
+++ b/Completion/Cvs/_cvs_diff_arg
@@ -0,0 +1,3 @@
+#autoload
+
+_cvs_files_modified || _cvs_files
diff --git a/Completion/Cvs/_cvs_directories b/Completion/Cvs/_cvs_directories
new file mode 100644
index 000000000..86865b06f
--- /dev/null
+++ b/Completion/Cvs/_cvs_directories
@@ -0,0 +1,8 @@
+#autoload
+
+if [[ -d ${pref}CVS ]]; then
+  _cvs_setup_direntries
+  (( $#entries )) && compgen "$@" -g "${(j:|:)${(@)entries:q}}"
+else
+  _files "$@"
+fi
diff --git a/Completion/Cvs/_cvs_edit b/Completion/Cvs/_cvs_edit
new file mode 100644
index 000000000..f8dac031d
--- /dev/null
+++ b/Completion/Cvs/_cvs_edit
@@ -0,0 +1,7 @@
+#autoload
+
+# "+lRa:"
+_arguments -s \
+  -{l,R} \
+  '-a+:action:(edit unedit commit all none)'
+  '*:file:_cvs_files'
diff --git a/Completion/Cvs/_cvs_editor b/Completion/Cvs/_cvs_editor
new file mode 100644
index 000000000..e5298043a
--- /dev/null
+++ b/Completion/Cvs/_cvs_editor
@@ -0,0 +1,3 @@
+#autoload
+
+compadd "$@" vi
diff --git a/Completion/Cvs/_cvs_editors b/Completion/Cvs/_cvs_editors
new file mode 100644
index 000000000..4af00dea0
--- /dev/null
+++ b/Completion/Cvs/_cvs_editors
@@ -0,0 +1,6 @@
+#autoload
+
+# "+lR"
+_arguments -s \
+  -{l,R} \
+  '*:file:_cvs_files'
diff --git a/Completion/Cvs/_cvs_export b/Completion/Cvs/_cvs_export
new file mode 100644
index 000000000..9d5731b2c
--- /dev/null
+++ b/Completion/Cvs/_cvs_export
@@ -0,0 +1,10 @@
+#autoload
+
+# "+Nnk:d:flRQqr:D:"
+_arguments -s \
+  -{N,n,f,l,R,Q,q} \
+  '-k+:keyword substitution:_cvs_k' \
+  '-d+:directory:_files -/' \
+  '-r+:tag:_cvs_revisions' \
+  '-D+:date:_cvs_D' \
+  '*:module:_cvs_modules'
diff --git a/Completion/Cvs/_cvs_extract_directory_entries b/Completion/Cvs/_cvs_extract_directory_entries
new file mode 100644
index 000000000..f0c158cfe
--- /dev/null
+++ b/Completion/Cvs/_cvs_extract_directory_entries
@@ -0,0 +1,3 @@
+#autoload
+
+entries=($entries ${${${(M)rawentries:#D/*}#D/}%%/*})
diff --git a/Completion/Cvs/_cvs_extract_file_entries b/Completion/Cvs/_cvs_extract_file_entries
new file mode 100644
index 000000000..7e04119e4
--- /dev/null
+++ b/Completion/Cvs/_cvs_extract_file_entries
@@ -0,0 +1,3 @@
+#autoload
+
+entries=($entries ${${${(M)rawentries:#/*}#/}%%/*})
diff --git a/Completion/Cvs/_cvs_extract_modifiedfile_entries b/Completion/Cvs/_cvs_extract_modifiedfile_entries
new file mode 100644
index 000000000..41916dad9
--- /dev/null
+++ b/Completion/Cvs/_cvs_extract_modifiedfile_entries
@@ -0,0 +1,13 @@
+#autoload
+
+if [[ -n "$compconfig[_cvs_disable_stat]" ]] ||
+  ! { zmodload -e stat || zmodload stat }; then
+  _cvs_extract_file_entries
+  return
+fi
+
+local ents pats
+ents=(${${${${(M)rawentries:#/*}#/}/\\/[^\\/]#\\///}%/[^/]#/[^/]#})
+pats=(${${${(f)"$(LANG=C builtin stat -gn +mtime -F '%a %b %e %T %Y' ${pref}*(D))"}##*/}/ //})
+eval 'ents=(${ents:#('${(j:|:)${(@)pats:q}}')})'
+entries=($entries ${ents%%/*})
diff --git a/Completion/Cvs/_cvs_files b/Completion/Cvs/_cvs_files
new file mode 100644
index 000000000..f2a83ac28
--- /dev/null
+++ b/Completion/Cvs/_cvs_files
@@ -0,0 +1,10 @@
+#autoload
+
+local qpref pref entries
+_cvs_setup_prefix
+if [[ -d ${pref}CVS ]]; then
+  _cvs_setup_allentries
+  (( $#entries )) && compgen "$@" -g "${(j:|:)${(@)entries:q}}"
+else
+  _files "$@"
+fi
diff --git a/Completion/Cvs/_cvs_files_modified b/Completion/Cvs/_cvs_files_modified
new file mode 100644
index 000000000..f30e42326
--- /dev/null
+++ b/Completion/Cvs/_cvs_files_modified
@@ -0,0 +1,10 @@
+#autoload
+
+local qpref pref entries
+_cvs_setup_prefix
+if [[ -d ${pref}CVS ]]; then
+  _cvs_setup_modentries
+  (( $#entries )) && compgen "$@" -g "${(j:|:)${(@)entries:q}}"
+else
+  _files "$@"
+fi
diff --git a/Completion/Cvs/_cvs_files_removed b/Completion/Cvs/_cvs_files_removed
new file mode 100644
index 000000000..d5b9252f9
--- /dev/null
+++ b/Completion/Cvs/_cvs_files_removed
@@ -0,0 +1,15 @@
+#autoload
+
+local qpref pref entries
+_cvs_setup_prefix
+if [[ -d ${pref}CVS ]]; then
+  _cvs_setup_allentries
+  setopt localoptions unset
+  local omit
+  omit=(${pref}*(D:t))
+  eval 'entries=(${entries:#('${(j:|:)${(@)omit:q}}')})'
+  compadd "$@" -P "$qpref" - ${entries:q} ||
+  _cvs_directories "$@"
+else
+  _files "$@"
+fi
diff --git a/Completion/Cvs/_cvs_files_unmaintained b/Completion/Cvs/_cvs_files_unmaintained
new file mode 100644
index 000000000..4cd7ca724
--- /dev/null
+++ b/Completion/Cvs/_cvs_files_unmaintained
@@ -0,0 +1,26 @@
+#autoload
+
+if (( ! $+_cvs_ignore_default )); then
+  _cvs_ignore_default=(
+    RCS SCCS CVS CVS.adm RCSLOG 'cvslog.*' tags TAGS .make.state .nse_depinfo
+    '*\~' '\#*' '.\#*' ',*' '_$*' '*$' '*.old' '*.bak' '*.BAK' '*.orig' '*.rej'
+    '.del-*' '*.a' '*.olb' '*.o' '*.obj' '*.so' '*.exe' '*.Z' '*.elc' '*.ln'
+    core
+  )
+fi
+
+local qpref pref entries
+_cvs_setup_prefix
+if [[ -d ${pref}CVS ]]; then
+  _cvs_setup_allentries
+  setopt localoptions unset
+  local omit
+  omit=($_cvs_ignore_default ${entries:q} ${=cvsignore})
+  [[ -r ~/.cvsignore ]] && omit=($omit $(<~/.cvsignore))
+  [[ -r ${pref}.cvsignore ]] && omit=($omit $(<${pref}.cvsignore))
+  compgen "$@" -g '*~(*/|)('${(j:|:)omit}')(D)' ||
+  compgen "$@" -g '*~(*/|)('${(j:|:)${(@)entries:q}}')(D)' ||
+  _cvs_directories "$@"
+else
+  _files "$@"
+fi
diff --git a/Completion/Cvs/_cvs_gzip_level b/Completion/Cvs/_cvs_gzip_level
new file mode 100644
index 000000000..dba03915d
--- /dev/null
+++ b/Completion/Cvs/_cvs_gzip_level
@@ -0,0 +1,3 @@
+#autoload
+
+compadd "$@" 9
diff --git a/Completion/Cvs/_cvs_history b/Completion/Cvs/_cvs_history
new file mode 100644
index 000000000..41624a873
--- /dev/null
+++ b/Completion/Cvs/_cvs_history
@@ -0,0 +1,18 @@
+#autoload
+
+# "+Tacelow?D:b:f:m:n:p:r:t:u:x:X:z:"
+_arguments -s \
+  -{T,a,c,e,l,o,w,\?} \
+  '-D+:date:_cvs_D' \
+  '-b+:string:' \
+  '-f+:arg:' \
+  '-m+:module:_cvs_modules' \
+  '-n+:arg:' \
+  '*-p+:repository:' \
+  '-r+:rev:' \
+  '-t+:tag:' \
+  '-u+:user name:' \
+  '-x+:type:_cvs_history_x' \
+  '-X+:arg:' \
+  '-z+:arg:' \
+  '*:file:_cvs_files'
diff --git a/Completion/Cvs/_cvs_history_x b/Completion/Cvs/_cvs_history_x
new file mode 100644
index 000000000..ad5ce5e28
--- /dev/null
+++ b/Completion/Cvs/_cvs_history_x
@@ -0,0 +1,5 @@
+#autoload
+
+compset -P '*'
+# It should describe meaning.
+compadd F O E T C G U W A M R
diff --git a/Completion/Cvs/_cvs_import b/Completion/Cvs/_cvs_import
new file mode 100644
index 000000000..365e8fbca
--- /dev/null
+++ b/Completion/Cvs/_cvs_import
@@ -0,0 +1,13 @@
+#autoload
+
+# "+Qqdb:m:I:k:W:"
+_arguments -s \
+  -{Q,q,d} \
+  '-b+:branch:' \
+  '-m+:message:_cvs_m' \
+  '*-I+:name:_files' \
+  '-k+:keyword substitution:_cvs_k' \
+  '*-W+:spec:' \
+  ':repository:_cvs_modules' \
+  ':vendor tag:' \
+  ':release tag:'
diff --git a/Completion/Cvs/_cvs_init b/Completion/Cvs/_cvs_init
new file mode 100644
index 000000000..f24867434
--- /dev/null
+++ b/Completion/Cvs/_cvs_init
@@ -0,0 +1,3 @@
+#autoload
+
+false
diff --git a/Completion/Cvs/_cvs_k b/Completion/Cvs/_cvs_k
new file mode 100644
index 000000000..f9cf396d0
--- /dev/null
+++ b/Completion/Cvs/_cvs_k
@@ -0,0 +1,3 @@
+#autoload
+
+compadd "$@" kv kvl k o b v
diff --git a/Completion/Cvs/_cvs_login b/Completion/Cvs/_cvs_login
new file mode 100644
index 000000000..f24867434
--- /dev/null
+++ b/Completion/Cvs/_cvs_login
@@ -0,0 +1,3 @@
+#autoload
+
+false
diff --git a/Completion/Cvs/_cvs_m b/Completion/Cvs/_cvs_m
new file mode 100644
index 000000000..ccb843204
--- /dev/null
+++ b/Completion/Cvs/_cvs_m
@@ -0,0 +1,3 @@
+#autoload
+
+_message "log message"
diff --git a/Completion/Cvs/_cvs_modules b/Completion/Cvs/_cvs_modules
new file mode 100644
index 000000000..f662f8a6e
--- /dev/null
+++ b/Completion/Cvs/_cvs_modules
@@ -0,0 +1,12 @@
+#autoload
+
+local root=$CVSROOT
+[[ -f CVS/Root ]] && root=$(<CVS/Root)
+
+if [[ $root = :* || ! -d $root ]]; then
+  _message "module name"
+else
+  compadd - \
+    $root/^CVSROOT(:t) \
+    ${${(M)${(f)"$(<$root/CVSROOT/modules)"}:#[^#]*}%%[ 	]*}
+fi
diff --git a/Completion/Cvs/_cvs_rdiff b/Completion/Cvs/_cvs_rdiff
new file mode 100644
index 000000000..a83a6dc0c
--- /dev/null
+++ b/Completion/Cvs/_cvs_rdiff
@@ -0,0 +1,10 @@
+#autoload
+
+# "+V:k:cuftsQqlRD:r:"
+_arguments -s \
+  -{c,u,f,t,s,Q,q,l,R} \
+  '-V+:version:' \
+  '-k+:keyword substitution:_cvs_k' \
+  '*-D+:date:_cvs_D' \
+  '*-r+:tag:_cvs_revisions' \
+  '*:module:_cvs_modules'
diff --git a/Completion/Cvs/_cvs_release b/Completion/Cvs/_cvs_release
new file mode 100644
index 000000000..2260a2bc3
--- /dev/null
+++ b/Completion/Cvs/_cvs_release
@@ -0,0 +1,6 @@
+#autoload
+
+# "+Qdq"
+_arguments -s \
+  -{Q,d,q} \
+  '*:directory:_files -/'
diff --git a/Completion/Cvs/_cvs_remove b/Completion/Cvs/_cvs_remove
new file mode 100644
index 000000000..0ad55efd1
--- /dev/null
+++ b/Completion/Cvs/_cvs_remove
@@ -0,0 +1,6 @@
+#autoload
+
+# "+flR"
+_arguments -s \
+  -{f,l,R} \
+  '*:file:_cvs_files_removed'
diff --git a/Completion/Cvs/_cvs_revisions b/Completion/Cvs/_cvs_revisions
new file mode 100644
index 000000000..cf92a3942
--- /dev/null
+++ b/Completion/Cvs/_cvs_revisions
@@ -0,0 +1,3 @@
+#autoload
+
+compadd - ${${${(M)${(f)"$(cvs -q status -vl .)"}:#	*}##[ 	]##}%%[ 	]*}
diff --git a/Completion/Cvs/_cvs_root b/Completion/Cvs/_cvs_root
new file mode 100644
index 000000000..83ba5d93d
--- /dev/null
+++ b/Completion/Cvs/_cvs_root
@@ -0,0 +1,11 @@
+#autoload
+
+if (( ! $+_cvs_roots )); then
+  if [[ -f ~/.cvspass ]]; then
+    _cvs_roots=(${${(f)"$(<~/.cvspass)"}%% *})
+  else
+    _cvs_roots=()
+  fi
+fi
+
+compadd "$@" $_cvs_roots || _files "$@" -/
diff --git a/Completion/Cvs/_cvs_setup_allentries b/Completion/Cvs/_cvs_setup_allentries
new file mode 100644
index 000000000..0e1ee68f8
--- /dev/null
+++ b/Completion/Cvs/_cvs_setup_allentries
@@ -0,0 +1,9 @@
+#autoload
+
+entries=()
+if [[ -f ${pref}CVS/Entries ]]; then
+  local rawentries
+  rawentries=(${(f)"$(<${pref}CVS/Entries)"})
+  _cvs_extract_file_entries
+  _cvs_extract_directory_entries
+fi
diff --git a/Completion/Cvs/_cvs_setup_direntries b/Completion/Cvs/_cvs_setup_direntries
new file mode 100644
index 000000000..0f1ffbb53
--- /dev/null
+++ b/Completion/Cvs/_cvs_setup_direntries
@@ -0,0 +1,8 @@
+#autoload
+
+entries=()
+if [[ -f ${pref}CVS/Entries ]]; then
+  local rawentries
+  rawentries=(${(f)"$(<${pref}CVS/Entries)"})
+  _cvs_extract_directory_entries
+fi
diff --git a/Completion/Cvs/_cvs_setup_modentries b/Completion/Cvs/_cvs_setup_modentries
new file mode 100644
index 000000000..df1aabe57
--- /dev/null
+++ b/Completion/Cvs/_cvs_setup_modentries
@@ -0,0 +1,9 @@
+#autoload
+
+entries=()
+if [[ -f ${pref}CVS/Entries ]]; then
+  local rawentries
+  rawentries=(${(f)"$(<${pref}CVS/Entries)"})
+  _cvs_extract_modifiedfile_entries
+  _cvs_extract_directory_entries
+fi
diff --git a/Completion/Cvs/_cvs_setup_prefix b/Completion/Cvs/_cvs_setup_prefix
new file mode 100644
index 000000000..fff4ffe88
--- /dev/null
+++ b/Completion/Cvs/_cvs_setup_prefix
@@ -0,0 +1,9 @@
+#autoload
+
+if [[ -prefix */ ]]; then
+  qpref="${PREFIX%/*}/"
+  pref=$~qpref
+else
+  qpref=
+  pref=./
+fi
diff --git a/Completion/Cvs/_cvs_status b/Completion/Cvs/_cvs_status
new file mode 100644
index 000000000..2860c260e
--- /dev/null
+++ b/Completion/Cvs/_cvs_status
@@ -0,0 +1,6 @@
+#autoload
+
+# "+vlR"
+_arguments -s \
+  -{v,l,R} \
+  '*:file:_cvs_files'
diff --git a/Completion/Cvs/_cvs_tag b/Completion/Cvs/_cvs_tag
new file mode 100644
index 000000000..6e9bbfac4
--- /dev/null
+++ b/Completion/Cvs/_cvs_tag
@@ -0,0 +1,8 @@
+#autoload
+
+# "+FQqlRcdr:D:bf"
+_arguments -s \
+  -{F,Q,q,l,R,c,d,b,f} \
+  '-r+:tag:_cvs_revisions' \
+  '-D+:date:_cvs_D' \
+  '*:file:_cvs_files'
diff --git a/Completion/Cvs/_cvs_tempdir b/Completion/Cvs/_cvs_tempdir
new file mode 100644
index 000000000..94ab27352
--- /dev/null
+++ b/Completion/Cvs/_cvs_tempdir
@@ -0,0 +1,3 @@
+#autoload
+
+compadd "$@" $TMPPREFIX:h $TMPDIR /tmp
diff --git a/Completion/Cvs/_cvs_unedit b/Completion/Cvs/_cvs_unedit
new file mode 100644
index 000000000..4af00dea0
--- /dev/null
+++ b/Completion/Cvs/_cvs_unedit
@@ -0,0 +1,6 @@
+#autoload
+
+# "+lR"
+_arguments -s \
+  -{l,R} \
+  '*:file:_cvs_files'
diff --git a/Completion/Cvs/_cvs_update b/Completion/Cvs/_cvs_update
new file mode 100644
index 000000000..d3ede3752
--- /dev/null
+++ b/Completion/Cvs/_cvs_update
@@ -0,0 +1,12 @@
+#autoload
+
+# "+ApPflRQqduk:r:D:j:I:W:"
+_arguments -s \
+  -{A,p,P,f,l,R,Q,q,d,u} \
+  '-k+:keyword substitution:_cvs_k' \
+  '-r+:tag:_cvs_revisions' \
+  '-D+:date:_cvs_D' \
+  '-j+:tag:_cvs_revisions' \
+  '*-I+:name:_files' \
+  '*-W+:spec:' \
+  '*:file:_cvs_files'
diff --git a/Completion/Cvs/_cvs_user_variable b/Completion/Cvs/_cvs_user_variable
new file mode 100644
index 000000000..6768d2dee
--- /dev/null
+++ b/Completion/Cvs/_cvs_user_variable
@@ -0,0 +1,7 @@
+#autoload
+
+if compset -P '*='; then
+  _default
+else
+  _message "variable=value"
+fi
diff --git a/Completion/Cvs/_cvs_watch b/Completion/Cvs/_cvs_watch
new file mode 100644
index 000000000..4db814ae5
--- /dev/null
+++ b/Completion/Cvs/_cvs_watch
@@ -0,0 +1,21 @@
+#autoload
+
+if (( CURRENT == 2 )); then
+  compadd on off add remove
+else
+  case "$words[2]" in
+    on|off) # "+lR"
+      _arguments -s \
+	-{l,R} \
+	':watch command:' \
+	':*:file:_cvs_files'
+      ;;
+    add|remove) # "+lRa:"
+      _arguments -s \
+	-{l,R} \
+	'*-a+:action:(edit unedit commit all none)' \
+	':watch command:' \
+	':*:file:_cvs_files'
+      ;;
+  esac
+fi
diff --git a/Completion/Cvs/_cvs_watchers b/Completion/Cvs/_cvs_watchers
new file mode 100644
index 000000000..8a1045a10
--- /dev/null
+++ b/Completion/Cvs/_cvs_watchers
@@ -0,0 +1,6 @@
+#autoload
+
+# "+lR"
+_arguments -s \
+  -{l,R} \
+  ':*:file:_cvs_files'