From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6514 invoked from network); 5 Jun 2003 10:33:07 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 5 Jun 2003 10:33:07 -0000 Received: (qmail 23136 invoked by alias); 5 Jun 2003 10:32:53 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6154 Received: (qmail 23127 invoked from network); 5 Jun 2003 10:32:53 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 5 Jun 2003 10:32:53 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.183.235] by sunsite.dk (MessageWall 1.0.8) with SMTP; 5 Jun 2003 10:32:51 -0000 Received: from EXCHANGE02.csr.com (unverified) by (Content Technologies SMTPRS 4.2.1) with ESMTP id for ; Thu, 5 Jun 2003 11:43:19 +0100 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.5329); Thu, 5 Jun 2003 10:45:42 +0100 To: zsh-users@sunsite.dk Subject: Re: Bad "bad pattern" in ${foo//pat/repl} ? In-reply-to: ""S. Cowles""'s message of "Wed, 04 Jun 2003 17:09:38 PDT." <200306041709.41497.scowles@earthlink.net> Date: Thu, 05 Jun 2003 10:45:33 +0100 Message-ID: <18109.1054806333@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 05 Jun 2003 09:45:42.0985 (UTC) FILETIME=[3B0C7390:01C32B47] "S. Cowles" wrote: > almost a year ago, Bart Schaefer added the following note to the email=20 > archives: > > schaefer<506> echo ${foo//#a*/yes} > zsh: bad pattern: #a* It's a simple typo, it just got ignored. Index: Src/subst.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/subst.c,v retrieving revision 1.34 diff -u -r1.34 subst.c --- Src/subst.c 22 May 2003 10:11:15 -0000 1.34 +++ Src/subst.c 5 Jun 2003 09:43:25 -0000 @@ -1420,7 +1420,7 @@ if ((c = *s) == '/') { /* doubled, so replace all occurrences */ flags |= SUB_GLOBAL; - s++; + c = *++s; } /* Check for anchored substitution */ if (c == '%') { -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************