mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 13:01:28 +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:
parent
6db6cde964
commit
1363c2fcc3
2 changed files with 11 additions and 5 deletions
|
@ -1,5 +1,9 @@
|
||||||
2000-10-25 Sven Wischnowsky <wischnow@zsh.org>
|
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
|
* 13084: Src/Zle/complist.c: re-display list for cleanup only if
|
||||||
we were in menu selection
|
we were in menu selection
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
#compdef co ci rcs
|
#compdef co ci rcs
|
||||||
|
|
||||||
local nm=$compstate[nmatches] cmd="${words[1]:t}"
|
local nm=$compstate[nmatches] cmd="${words[1]:t}" ret=1
|
||||||
|
|
||||||
[[ $cmd = ci || $cmd = rcs ]] && _files
|
|
||||||
|
|
||||||
if [[ $compstate[nmatches] -eq nm && -d RCS && $cmd != ci ]]; then
|
if [[ $compstate[nmatches] -eq nm && -d RCS && $cmd != ci ]]; then
|
||||||
local rep expl
|
local rep expl
|
||||||
|
|
||||||
rep=(RCS/$PREFIX*$SUFFIX,v(:t:s/\,v//))
|
rep=(RCS/*,v(:t:s/\,v//))
|
||||||
(( $#rep )) && _wanted files expl 'RCS file' compadd -a rep
|
(( $#rep )) && _wanted files expl 'RCS file' compadd -a rep && ret=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[[ $cmd = ci || $cmd = rcs || ret -eq 1 ]] && _files && ret=0
|
||||||
|
|
||||||
|
return ret
|
||||||
|
|
Loading…
Reference in a new issue