1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

use return value of _files, don't use ${PRE,SUF}FIX for globbing, complete all files as a default for co (3472)

This commit is contained in:
Sven Wischnowsky 2000-10-25 12:30:16 +00:00
parent 6db6cde964
commit 1363c2fcc3
2 changed files with 11 additions and 5 deletions

View file

@ -1,5 +1,9 @@
2000-10-25 Sven Wischnowsky <wischnow@zsh.org>
* 3472: Completion/User/_rcs: use return value of _files, don't
use ${PRE,SUF}FIX for globbing, complete all files as a default
forco
* 13084: Src/Zle/complist.c: re-display list for cleanup only if
we were in menu selection

View file

@ -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