From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id TAA27063 for ; Mon, 24 Jul 1995 19:27:12 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA07835 (5.65c/Gatech-10.0-IDA for ); Mon, 24 Jul 1995 05:23:28 -0400 Received: by math (5.x/SMI-SVR4) id AA04775; Mon, 24 Jul 1995 05:15:41 -0400 Resent-Date: Mon, 24 Jul 1995 10:46:26 +0100 (MET DST) Old-Return-Path: From: hzoli@cs.elte.hu (Zoltan Hidvegi) Message-Id: <9507240914.AA03247@turan.elte.hu> Subject: Re: list-expand fix and a bug report To: mdb@cdc.noaa.gov (Mark Borges) Date: Mon, 24 Jul 1995 10:46:26 +0100 (MET DST) In-Reply-To: <9507212037.AA10841@suomi.cdc.noaa.gov> from "Mark Borges" at Jul 21, 95 02:37:21 pm X-Mailer: ELM [version 2.4 PL21] Content-Type: text Sender: hzoli@cs.elte.hu Resent-Message-Id: <"bUQU03.0.XA1.yIs4m"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/266 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Mark Borges wrote: > Do any of these patches for 10.1 (or 10+ for that matter) fix this: No, bat there is a patch below for that. > >> Mark Borges(mb) wrote on Mon, 17 Jul 95 14:50:50 MDT: > mb> Are you seeing this? > > mb> Somewhere between hzoli9 and hzoli10.1 completion inside a for > mb> control structure doesn't work. For example, > > mb> $ ~/bin/sparc/zsh-2.6h9 -f > mb> bjerknes% echo $ZSH_VERSION > mb> 2.6-beta9 > mb> bjerknes% setopt autolist > mb> bjerknes% for i in a*; do > >> echo a # a tab correctly prints out the ambiguous files > mb> a1 a2 a3 > > mb> but in hzoli10.1: > > mb> $ ~/bin/sparc/zsh-2.6h10.1 -f > mb> bjerknes% echo $ZSH_VERSION > mb> 2.6-beta10-hzoli10.1 > mb> bjerknes% setopt autolist > mb> bjerknes% for i in a*; do > > >> echo a # Huh? Another a keeps getting added, and no list is printed. > > >> echo aa > > >> echo aaa # can go on indefinitely > > >> echo aaaa > > >> echo aaaaa > > >> echo aaaaaa > > mb> This also has patches from zefram (I forget what they do). I was just > mb> curious if the bug has infected your copy as well. In fact the bug appeared after Peter's input patches. The problem again is that unlike the old history code, ingetch() doesn't remove tokens from the input stream. I is not necessarily a bug although I think this should be put back in there (it's only one line) as tokens in iput can cause completely unexpected results. But for now it is good as it showed up two old bug so far. This particular bug is in zle_tricky.c. If the current line is part of a command structure, zle prepends chline to the current line before calling the lexer. But chline contains HISTSPACEs which should be replaced with normal spaces. Here is the one line patch for that. It can be (and should be) applied to any zsh release. Bye, Zoltan --- 1.30 1995/07/22 22:52:16 +++ Src/zle_tricky.c 1995/07/22 23:00:34 @@ -522,7 +522,7 @@ *q++ = '\\'; *q++ = '\\'; } - *q++ = *p; + *q++ = *p == HISTSPACE ? ' ' : *p; } /* Put a zero byte after it and append the original line contents. */ *q = '\0';