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

Re: bug in 3.1.4 completion



"Bart Schaefer" wrote:

> 
> On Nov 4, 10:04am, Sven Wischnowsky wrote:
> } Subject: Re:  bug in 3.1.4 completion
> }
> } greg@xxxxxxxxxxxxx wrote:
> } 
> } > % ls f               ; now type TAB
> } >   -> foo/            ; now type TAB
> } >   -> foo/bar         ; now type SPACE
> } >   -> foo/ba          ; notice the "r" got removed.
> } > 
> } > This only seems to happen if you complete "foo" then
> } > immediately hit TAB again.  If you type part of "bar" and
> } > then TAB it functions correctly.
> } 
> } There was a missing fixsuffix() when inserting the unambiguous string
> } for normal completion. It's fixed by the second hunk in the patch
> } below (this is for 3.1.5, but you can easily insert the call to
> } fixsuffix() in 3.1.4 in do_ambiguous() in the else-branch of the `if(p)').
> 
> Two points:  (1) This patch is NOT for 3.1.5.  It's for 3.1.5 *after*
> one of Sven's other patches has been applied.  (2) I don't see the bug
> that Greg reported in my copy of 3.1.5, so it presumably was addressed
> by Sven's patch in zsh-workers/4412.
> 
> I don't think BOTH the 4412 patch and this one are needed; so which is
> better, Sven?  (I suspect Sven's other completion patches may have
> inadvertently backed out 4412, and therefore this fix got introduced
> in its place, but the 4412 one looks better to me.)
> 

I prefer the one from message 4528. The patch from 4412 just wanted to 
be absolutely sure and if do_single() was called, fixsuffix() got
called twice. The new patch avoids that.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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