From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19235 invoked from network); 26 Apr 2005 09:44:39 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Apr 2005 09:44:39 -0000 Received: (qmail 53696 invoked from network); 26 Apr 2005 09:44:33 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Apr 2005 09:44:33 -0000 Received: (qmail 16048 invoked by alias); 26 Apr 2005 09:44:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21195 Received: (qmail 16033 invoked from network); 26 Apr 2005 09:44:30 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Apr 2005 09:44:30 -0000 Received: (qmail 53427 invoked from network); 26 Apr 2005 09:44:29 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 26 Apr 2005 09:44:18 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id ; Tue, 26 Apr 2005 10:42:35 +0100 Received: from news01.csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 26 Apr 2005 10:44:45 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.1/8.12.11) with ESMTP id j3Q9iFKe011044; Tue, 26 Apr 2005 10:44:16 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.1/8.13.1/Submit) with ESMTP id j3Q9iF06011039; Tue, 26 Apr 2005 10:44:15 +0100 Message-Id: <200504260944.j3Q9iF06011039@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk, 306346-forwarded@bugs.debian.org Subject: Re: [mpol@charybda.icm.edu.pl: Bug#306346: zsh: replacement seems broken in prompt] In-reply-to: <1050426034916.ZM26792@candle.brasslantern.com> References: <20050426013716.GA3958@scowler.net> <1050426034916.ZM26792@candle.brasslantern.com> Date: Tue, 26 Apr 2005 10:44:14 +0100 From: Peter Stephenson X-OriginalArrivalTime: 26 Apr 2005 09:44:45.0682 (UTC) FILETIME=[9455F520:01C54A44] X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Bart Schaefer wrote: > What I don't know, though, is whether the Nularg test should be copied > into both igetmatch() and down to by the ztrsub() call in pattryrefs(), > or whether it should simply be > > /* inherited from domatch, but why, exactly? */ > if (*string == Nularg) > string++, unmetalen--; I'd be inclined to keep it local and use this fix. (This can end up with unmetalen being -2, but that doesn't matter.) Here's a test, too. Index: Src/pattern.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/pattern.c,v retrieving revision 1.25 diff -u -r1.25 pattern.c --- Src/pattern.c 24 Apr 2005 00:38:15 -0000 1.25 +++ Src/pattern.c 26 Apr 2005 09:40:40 -0000 @@ -1552,8 +1552,10 @@ *nump = 0; } /* inherited from domatch, but why, exactly? */ - if (*string == Nularg) + if (*string == Nularg) { string++; + unmetalen--; + } if (stringlen < 0) stringlen = strlen(string); Index: Test/D04parameter.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/D04parameter.ztst,v retrieving revision 1.9 diff -u -r1.9 D04parameter.ztst --- Test/D04parameter.ztst 21 May 2003 16:21:01 -0000 1.9 +++ Test/D04parameter.ztst 26 Apr 2005 09:40:40 -0000 @@ -599,3 +599,8 @@ >said >i >willJOYCE + + foo= + print "${${foo}/?*/replacement}" +0:Quoted zero-length strings are handled properly +> -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************