Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bad "bad pattern" in ${foo//pat/repl} ?
- X-seq: zsh-users 6154
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Bad "bad pattern" in ${foo//pat/repl} ?
- Date: Thu, 05 Jun 2003 10:45:33 +0100
- In-reply-to: ""S. Cowles""'s message of "Wed, 04 Jun 2003 17:09:38 PDT." <200306041709.41497.scowles@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
"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 <pws@xxxxxxx> 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.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author