diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-10-25 12:30:16 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-10-25 12:30:16 +0000 |
commit | 1363c2fcc312b2acbdd12853d560df8695b1f717 (patch) | |
tree | 59286cfb7cd54c4b7d47f55a9e87c4d618d1d85f /Completion/User/_rcs | |
parent | 6db6cde964ca152f3d83034695e0fe822c9e7011 (diff) | |
download | zsh-1363c2fcc312b2acbdd12853d560df8695b1f717.tar.gz zsh-1363c2fcc312b2acbdd12853d560df8695b1f717.tar.xz zsh-1363c2fcc312b2acbdd12853d560df8695b1f717.zip |
use return value of _files, don't use ${PRE,SUF}FIX for globbing, complete all files as a default for co (3472)
Diffstat (limited to 'Completion/User/_rcs')
-rw-r--r-- | Completion/User/_rcs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Completion/User/_rcs b/Completion/User/_rcs index d9280b11f..bbc8e02ac 100644 --- a/Completion/User/_rcs +++ b/Completion/User/_rcs @@ -1,12 +1,14 @@ #compdef co ci rcs -local nm=$compstate[nmatches] cmd="${words[1]:t}" - -[[ $cmd = ci || $cmd = rcs ]] && _files +local nm=$compstate[nmatches] cmd="${words[1]:t}" ret=1 if [[ $compstate[nmatches] -eq nm && -d RCS && $cmd != ci ]]; then local rep expl - rep=(RCS/$PREFIX*$SUFFIX,v(:t:s/\,v//)) - (( $#rep )) && _wanted files expl 'RCS file' compadd -a rep + rep=(RCS/*,v(:t:s/\,v//)) + (( $#rep )) && _wanted files expl 'RCS file' compadd -a rep && ret=0 fi + +[[ $cmd = ci || $cmd = rcs || ret -eq 1 ]] && _files && ret=0 + +return ret |