From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27716 invoked from network); 4 Nov 1998 18:13:03 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 4 Nov 1998 18:13:03 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id NAA26881; Wed, 4 Nov 1998 13:05:50 -0500 (EST) Resent-Date: Wed, 4 Nov 1998 13:05:50 -0500 (EST) From: "Bart Schaefer" Message-Id: <981104095909.ZM21401@candle.brasslantern.com> Date: Wed, 4 Nov 1998 09:59:09 -0800 In-Reply-To: <199811040904.KAA29172@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: bug in 3.1.4 completion" (Nov 4, 10:04am) References: <199811040904.KAA29172@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Sven Wischnowsky , zsh-workers@math.gatech.edu Subject: Re: bug in 3.1.4 completion Cc: greg@alphatech.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"U66Gw3.0.yZ6.-T9Gs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4539 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Nov 4, 10:04am, Sven Wischnowsky wrote: } Subject: Re: bug in 3.1.4 completion } } greg@alphatech.com 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.) } > % 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. } } Here is another missing call to fixsuffix() (fixed by the first } hunk). This hunk *is* needed, however. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com