From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8470 invoked from network); 4 Jan 1999 02:21:07 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 4 Jan 1999 02:21:07 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id VAA24976; Sun, 3 Jan 1999 21:20:08 -0500 (EST) Resent-Date: Sun, 3 Jan 1999 21:20:08 -0500 (EST) From: "Bart Schaefer" Message-Id: <990103181436.ZM2084@candle.brasslantern.com> Date: Sun, 3 Jan 1999 18:14:36 -0800 In-Reply-To: <000301be3493$63f80cb0$21c9ca95@mowp.siemens.ru> Comments: In reply to "Andrej Borsenkow" "zsh-3.1.5-pws4. accept-and-menu-complete bug?" (Dec 31, 10:58am) References: <000301be3493$63f80cb0$21c9ca95@mowp.siemens.ru> X-Mailer: Z-Mail (4.0b.820 20aug96) To: "Andrej Borsenkow" , "ZSH workers mailing list" Subject: Re: zsh-3.1.5-pws4. accept-and-menu-complete bug? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"jSDid3.0.B66.OL2as"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4877 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Dec 31, 10:58am, Andrej Borsenkow wrote: } Subject: zsh-3.1.5-pws4. accept-and-menu-complete bug? } } bor@itsrm2:/tools/src%> bindkey '^[^M' } "^[^M" accept-and-menu-complete } bor@itsrm2:/tools/src%> rm -rf mc-4.5.1/^@mc-4.5.3/ } mc-4.5.1/ mc-4.5.3/ } } Note this ^@ and not removed suffix instead of blank. In acceptandmenucomplete() in zle_tricky.c, there's this fragment: cs = menuend + menuinsc; inststrlen(" ", 1, 1); menuinsc = menulen = 0; menupos = cs; menuend is supposed to be "the end position of this string in the command line" and menuinsc "is the length of any suffix that has been temporarily added." However, at that point menuend is large enough to *include* the trailing slash. In 3.0.5's acceptandmenucomplete(), menuinsc is not added when computing cs. So I don't know if this is a general problem -- that menuend is just plain wrong, and anything that refers to it will be messed up -- or if that ref to menuinsc crept in by mistake and should be deleted (in which case the suffix doesn't get autoremoved), or if there's a whole lot of suffix-removal code that ought to be copied from 3.0.5, or what. Sven? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com