Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities



Andrej Borsenkow wrote:

> 3.1.6-bart-8 just compiled and installed.
> 
> ...
> 
> Case 1 (O.K.)
         ^^^^^^

Uff. Good. ;-)

> bor@itsrm2:~%> l /t/s/z/f/_<TAB>
> bor@itsrm2:~%> l /tools/share/zsh/functions<CURSOR>/_
> functions/      functions.old/
> Now press cursror-right,TAB
> bor@itsrm2:~%> l /tools/share/zsh/functions/_
> zsh: do you wish to see all 194 possibilities? 

Remember this line...

> so far so good
> 
> Case 2 (strange)
> bor@itsrm2:~%> l /t/s/z/f/_<TAB><TAB>
> bor@itsrm2:~%> l /tools/share/zsh/functions<CURSOR>/_
> functions/      functions.old/
> ^^ highlighted
> Now press "/" (accept-and-infer-next-history)
> bor@itsrm2:~%> l /tools/share/zsh/functions/_a2ps
> 
> Oops! No more completion there inside /tools/share/zsh/functions

Because (as it said above), there are too many matches to display
them. I was aware of this when I wrote that code but didn't know what
to do - -so I just made it give up. But what do you think, it should
do? It *can't* display the menu in this case... Should we disallow
a-a-i-n-h in this case? I think this would be even weirder.

> Case 3 (weird)
> bor@itsrm2:~%> l /t/s/z/f/_<TAB><TAB>
> bor@itsrm2:~%> l /tools/share/zsh/functions<CURSOR>/_
> functions/      functions.old/
> ^^ highlighted
> Now press RETURN, TAB
> bor@itsrm2:~%> l /tools/share/zsh/functions.old/_
> functions/      functions.old/
> TAB once more
> bor@itsrm2:~%> l /tools/share/zsh/functions/_    
> functions/      functions.old/

You don't like it that it continues menu-completion of the same
matches (because of `oldlist_list=_complete:...'). Yes, I agree, after 
a menu-selection we almost certainly don't want to re-use such a old
list.


Bye
 Sven

diff -u oldsrc/Zle/complist.c Src/Zle/complist.c
--- oldsrc/Zle/complist.c	Wed Nov  3 11:47:59 1999
+++ Src/Zle/complist.c	Wed Nov  3 12:46:55 1999
@@ -856,8 +856,7 @@
 	mselect = -1;
 	inselect = 0;
 	if (acc) {
-	    menucmp = 0;
-	    lastambig = 0;
+	    menucmp = lastambig = hasoldlist = 0;
 	    do_single(*(minfo.cur));
 	}
 	if (!noselect) {

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author