Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug in 3.1.4 completion
- X-seq: zsh-workers 4560
- From: greg@xxxxxxxxxxxxx (Greg Klanderman)
- To: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: bug in 3.1.4 completion
- Date: Thu, 5 Nov 1998 11:12:26 -0500 (EST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx, greg@xxxxxxxxxxxxx
- In-reply-to: <199811040904.KAA29172@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- References: <199811040904.KAA29172@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: greg@xxxxxxxxxxxxx
Sven,
I grabbed 3.1.5 and have a few comments...
(remember to copy me on replies. thanks)
>>>>> "Sven" == Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:
Sven>
Sven> greg@xxxxxxxxxxxxx wrote:
Sven>
>> Hi,
>>
>> I have found a minor bug in zsh 3.1.4 completion related to the
>> automagic removal of completed slashes. If I invoke zsh -f,
>>
>> % mkdir test
>> % cd test
>> % mkdir foo
>> % mkdir foo/bar foo/barbaz
>>
>> % 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.
Sven> There was a missing fixsuffix() when inserting the unambiguous string
Sven> for normal completion. It's fixed by the second hunk in the patch
Sven> below (this is for 3.1.5, but you can easily insert the call to
Sven> fixsuffix() in 3.1.4 in do_ambiguous() in the else-branch of the `if(p)').
As Bart noted, this is fixed in 3.1.5 as found on the ftp site.
Your second hunk is not even close to applying.
>> While I'm at it I have a few other nits about the completion system
>> (which on the whole I think is excellent).
>>
>> First, another somewhat inconvenient behavior related to slash removal
>> (again zsh -f, and with the same directories created above):
>>
>> % ls fo bar ; position the cursor on the space after the "o", hit TAB
>> -> foo/ bar ; now, the cursor is still on the space after the "/".
>> ; hit Control-d to delete the space
>> -> foo/bar ; with cursor on "b". now Control-e (end-of-line) and
>> -> foobar ; the "/" gets removed. ugh.
Sven> Here is another missing call to fixsuffix() (fixed by the first
Sven> hunk). This one goes into deletecharorlist() which has to do the
Sven> itself since the calling code doesn't call fixsuffix() since it may
Sven> use the completion code.
Fixed with the first hunk. Thanks.
>> Another behavior that's not quite right IMHO is completeinword:
>>
>> % setopt noalwaystoend completeinword
>> % ls fo/bar ; position cursor on "/", hit TAB
>> -> foo/bar/ ; hit TAB again
>> -> foo/bar// ; hit TAB again
>> -> foo/bar/// ; etc, never listing possible completions
>>
>> Even if I move past the "/", or even "b" it never jumps to the end of
>> "bar".
Sven> This is fixed in 3.1.5 with my last patches.
Do you mean a patch on top of 3.1.5, or one included in 3.1.5?
This does not appear to be fixed in 3.1.5 proper.
Greg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author