* Expand only completions, complete only uncompleted completions
@ 2000-05-05 14:46 Bart Schaefer
2000-05-05 16:15 ` Tanaka Akira
0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2000-05-05 14:46 UTC (permalink / raw)
To: zsh-workers
This is after applying patches up to 11195 (but not 11194, yet).
zagzig[116] cvs add _l*<TAB>
zagzig[116] cvs add _lzop
Completing file
_lzop _look
Hmm, what I wanted was for `_l*' to expand to exactly `_lzop _look'. But
then I remember that I don't have the `completions' style set. So I try
again, just to see if I can make it do what I wanted:
zagzig[116] cvs add _l*<C-xe>
zagzig[116] cvs add _look _lp _lynx _lzop
Completing all expansions
_look _lp _lynx _lzop
Completing expansions
_look _lp _lynx _lzop
Completing original
_l*
Is this the expected behavior? Shouldn't _expand_word use the completion
context to eliminate _lp and _lynx?
On a slightly different topic:
zagzig[117] cvs add _lzop _l<TAB>
Completing file
_lzop _look
No, I don't need _lzop any more, it's already there.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Expand only completions, complete only uncompleted completions
2000-05-05 14:46 Expand only completions, complete only uncompleted completions Bart Schaefer
@ 2000-05-05 16:15 ` Tanaka Akira
0 siblings, 0 replies; 2+ messages in thread
From: Tanaka Akira @ 2000-05-05 16:15 UTC (permalink / raw)
To: zsh-workers
In article <1000505144645.ZM651@candle.brasslantern.com>,
"Bart Schaefer" <schaefer@candle.brasslantern.com> writes:
> On a slightly different topic:
>
>
> zagzig[117] cvs add _lzop _l<TAB>
> Completing file
> _lzop _look
>
>
> No, I don't need _lzop any more, it's already there.
This patch do it.
(And allow multiple --allow-root.)
Index: Completion/User/_cvs
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_cvs,v
retrieving revision 1.4
diff -u -r1.4 _cvs
--- Completion/User/_cvs 2000/04/11 07:57:57 1.4
+++ Completion/User/_cvs 2000/05/05 16:12:02
@@ -7,7 +7,7 @@
_arguments -s \
-{a,f,H,l,n,Q,q,r,t,v,w,x} \
'--version' '--help' '--help-commands' '--help-synonyms' '--help-options' \
- '--allow-root=:rootdir:_files -/' \
+ '*--allow-root=:rootdir:_files -/' \
'-b+:bindir:_cvs_bindir' \
'-T+:temporary directory:_cvs_tempdir' \
'-d+:cvsroot:_cvs_root' \
@@ -601,6 +601,10 @@
_cvs_setup_prefix
if [[ -d ${pref}CVS ]]; then
_cvs_setup_modentries
+ setopt localoptions unset
+ local omit
+ omit=($line)
+ eval 'entries=(${entries:#('${(j:|:)${(@)omit:q}}')})'
(( $#entries )) && _files "$@" -g "${(j:|:)${(@)entries:q}}"
else
_files "$@"
@@ -615,7 +619,7 @@
_cvs_setup_allentries
setopt localoptions unset
local omit
- omit=(${pref}*(D:t))
+ omit=(${pref}*(D:t) $line)
eval 'entries=(${entries:#('${(j:|:)${(@)omit:q}}')})'
_tags directories && compadd "$@" -P "$qpref" - ${entries:q} ||
_cvs_directories "$@"
@@ -632,7 +636,7 @@
_cvs_setup_allentries
setopt localoptions unset
local omit
- omit=($_cvs_ignore_default ${entries:q} ${=cvsignore})
+ omit=($_cvs_ignore_default ${entries:q} ${=cvsignore} $line)
[[ -r ~/.cvsignore ]] && omit=($omit $(<~/.cvsignore))
[[ -r ${pref}.cvsignore ]] && omit=($omit $(<${pref}.cvsignore))
_path_files "$@" -g '*~(*/|)('${(j:|:)omit}')(D)' ||
--
Tanaka Akira
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-05-05 16:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-05 14:46 Expand only completions, complete only uncompleted completions Bart Schaefer
2000-05-05 16:15 ` Tanaka Akira
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).