From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27430 invoked from network); 7 Jan 1997 00:27:33 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 7 Jan 1997 00:27:33 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id TAA10171; Mon, 6 Jan 1997 19:32:40 -0500 (EST) Resent-Date: Mon, 6 Jan 1997 19:32:40 -0500 (EST) Date: Mon, 06 Jan 1997 17:35:44 -0700 From: John Harres Subject: Re: MH command completion problems In-reply-to: "Your message of Tue, 07 Jan 97 01:10:39 +0100." <199701070010.BAA01777@hzoli.ppp.cs.elte.hu> To: Zoltan Hidvegi Cc: zefram@dcs.warwick.ac.uk (Zefram), pws@ifh.de, Harres@UWyo.Edu, zsh-workers@math.gatech.edu Message-id: <199701070035.RAA26338@horseman.uwyo.edu> MIME-version: 1.0 X-Mailer: exmh version 2.0beta 12/23/96 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Authentication-warning: horseman.uwyo.edu: Host localhost didn't use HELO protocol X-MTS: smtp Resent-Message-ID: <"GRrui3.0.sU2.ecPqo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2737 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > > Peter Stephenson wrote: > > >tstfn() { reply=("${1%/*}/foo" "${1%/*}/bar") } > > >compctl -K tstfn -S / -q tstfn > > >tstfn foo/ > > > > > >This certainly gives me the double / (you can't get any more because > > >of the way tstfn is defined), but autolist does work for me. > > > > Yes, it's a shell bug. In the above scenario, tstfn is getting > > arguments "foo" and "". The already-present suffix is being ignored at > > that point, for completion purposes. The function returns completions > > "foo/foo" and "foo/bar". If I recall the internals correctly, this is > > being interpreted as requiring the addition of "/foo" or "/bar" to the > > existing string "foo". However, the additions are being applied to the > > string actually there, "foo/", which the function saw no indication > > of. > > > > Theoretically, it's a simple matter of programming to make the -S > > suffix be added in the right place. Actually it's a bit of a > > nightmare. > > I think it is not a nightmare. Try this patch (for zsh-3.0.x go to the Src > directory first). > > Zoltan Fixed both problems for me. THANKS! John Harres harres@uwyo.edu