From d14fab7bd7f9c73a1dd322798ba6f9ca416828d8 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 7 Sep 1999 23:00:57 +0000 Subject: zsh-workers/7706 --- Completion/User/_cvs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Completion/User') 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 -- cgit 1.4.1