From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4746 invoked from network); 27 Jan 2007 18:57:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Jan 2007 18:57:39 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 3759 invoked from network); 27 Jan 2007 18:57:32 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Jan 2007 18:57:32 -0000 Received: (qmail 13515 invoked by alias); 27 Jan 2007 18:57:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23136 Received: (qmail 13504 invoked from network); 27 Jan 2007 18:57:29 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 27 Jan 2007 18:57:29 -0000 Received: (qmail 3434 invoked from network); 27 Jan 2007 18:57:29 -0000 Received: from mtaout01-winn.ispmail.ntl.com (81.103.221.47) by a.mx.sunsite.dk with SMTP; 27 Jan 2007 18:57:22 -0000 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20070127185721.BQJM9447.mtaout01-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Sat, 27 Jan 2007 18:57:21 +0000 Received: from pwslaptop.csr.com ([82.6.97.4]) by aamtaout04-winn.ispmail.ntl.com with SMTP id <20070127185720.THUC29112.aamtaout04-winn.ispmail.ntl.com@pwslaptop.csr.com> for ; Sat, 27 Jan 2007 18:57:20 +0000 Date: Sat, 27 Jan 2007 18:55:43 +0000 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: 4.3.2/20061219 -> 4.3.2/20070126 very broken Message-Id: <20070127185543.19ac6b8e.p.w.stephenson@ntlworld.com> In-Reply-To: <20070127171501.GD8122@localhost.localdomain> References: <20070127170726.GC8122@localhost.localdomain> <20070127171501.GD8122@localhost.localdomain> X-Mailer: Sylpheed version 2.2.10 (GTK+ 2.10.4; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 27 Jan 2007 20:15:01 +0300 Alexey Tourbin wrote: > On Sat, Jan 27, 2007 at 08:07:26PM +0300, Alexey Tourbin wrote: > > Hello, > > 4.3.2/20061219 -> 4.3.2/20070126 > > > > The prompt cannot be displayed correctly and input is sort of broken > > (after pressing enter, the command is executed but the prompt is not > > displayed; pressing enter again gets the prompt back). > > > > git-bisect blames > > 23097: splitting of $'...' strings in completion > > PS: here is what my prompt is: Thanks, this combination allowed we to find it quite quickly. It was a major oversight in the the change to the way backslashes in $'...' are handled. At least, I presume this is the same problem you're seeing... the results of the bug could be unpredictable. Index: Src/utils.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/utils.c,v retrieving revision 1.150 diff -u -r1.150 utils.c --- Src/utils.c 21 Jan 2007 22:47:41 -0000 1.150 +++ Src/utils.c 27 Jan 2007 18:54:37 -0000 @@ -4914,23 +4914,34 @@ } else if (*s == Meta) *t++ = *++s ^ 32; else { - *t++ = *s; if (itok(*s)) { if (meta || control) { /* * Presumably we should be using meta or control * on the character representing the token. */ - *s = ztokens[*s - Pound]; + *t++ = ztokens[*s - Pound]; } else if (how & GETKEY_DOLLAR_QUOTE) { - /* - * We don't want to metafy this, it's a real - * token. - */ - *tdest++ = *s; + if (*s == Bnull) { + /* + * Bnull is a backslash which quotes a couple + * of special characters that always appear + * literally next. See strquote handling + * in gettokstr() in lex.c. + */ + *tdest++ = *++s; + } else { + /* + * We don't want to metafy this, it's a real + * token. + */ + *tdest++ = *s; + } continue; - } - } + } else + *t++ = *s; + } else + *t++ = *s; } if (meta == 2) { t[-1] |= 0x80; Index: Test/A03quoting.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/A03quoting.ztst,v retrieving revision 1.1 diff -u -r1.1 A03quoting.ztst --- Test/A03quoting.ztst 2 Apr 2001 12:30:47 -0000 1.1 +++ Test/A03quoting.ztst 27 Jan 2007 18:54:37 -0000 @@ -13,6 +13,10 @@ >'ut queant laxis' >"resonare fibris" + print -r $'\'a \\\' is \'a backslash\' is \'a \\\'' +0:$'-style quotes with backslashed backslashes +>'a \' is 'a backslash' is 'a \' + print -r '''' setopt rcquotes # We need to set rcquotes here for the next example since it is -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/