about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-07 23:00:57 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-07 23:00:57 +0000
commitd14fab7bd7f9c73a1dd322798ba6f9ca416828d8 (patch)
treeea4322d4dfe6c5947c07ff5e85d034e75cf5407f
parent39fad4f81c165370af5f3e059d88f82381df8a21 (diff)
downloadzsh-d14fab7bd7f9c73a1dd322798ba6f9ca416828d8.tar.gz
zsh-d14fab7bd7f9c73a1dd322798ba6f9ca416828d8.tar.xz
zsh-d14fab7bd7f9c73a1dd322798ba6f9ca416828d8.zip
zsh-workers/7706
-rw-r--r--Completion/User/_cvs13
1 files changed, 9 insertions, 4 deletions
diff --git a/Completion/User/_cvs b/Completion/User/_cvs
index df519f900..1cdbed4b3 100644
--- a/Completion/User/_cvs
+++ b/Completion/User/_cvs
@@ -35,11 +35,14 @@ _cvs_command () {
   if (( CURRENT == 1 )); then
     compadd "$@" ${(k)cmds} || compadd "$@" ${(kv)=cmds}
   else
-    _cvs_"${${(k)cmds[(R)* $words[1] *]}:-$words[1]}" 2>&- ||
-      _message "unknown cvs command: $words[1]"
+    _cvs_"${${(k)cmds[(R)* $words[1] *]}:-${words[1]:#*~(${(@kj:|:)~cmds})}}"
   fi
 }
 
+_cvs_ () {
+  _message "unknown cvs command: $words[1]"
+}
+
 # define completion functions for each cvs command
 
 builtin functions _cvs_add >&- ||
@@ -582,9 +585,11 @@ _cvs_files_unmaintained () {
 
 # define configuration variables.
 
+local tmp
+
 (( $+_cvs_roots )) ||
-if [[ -f ~/.cvspass ]]; then
-  _cvs_roots=(${${(f)"$(<~/.cvspass)"}%% *})
+if [[ -f "${tmp::=${CVS_PASSFILE:-$HOME/.cvspass}}" ]]; then
+  _cvs_roots=(${${(f)"$(<$tmp)"}%% *})
 else
   _cvs_roots=()
 fi