Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: PATCH: 3.1.5-pws-14: Re: bar='#pat'; ${foo/$bar/...} problem
- X-seq: zsh-workers 6003
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: PATCH: Re: PATCH: 3.1.5-pws-14: Re: bar='#pat'; ${foo/$bar/...} problem
- Date: Fri, 2 Apr 1999 03:33:21 -0800
- In-reply-to: <990402031321.ZM1039@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <002e01be7c48$968d8860$21c9ca95@xxxxxxxxxxxxxxx> <990402023951.ZM769@xxxxxxxxxxxxxxxxxxxxxxx> <990402031321.ZM1039@xxxxxxxxxxxxxxxxxxxxxxx>
On Apr 2, 3:13am, Bart Schaefer wrote:
} Subject: PATCH: 3.1.5-pws-14: Re: bar='#pat'; ${foo/$bar/...} problem
}
} Hopefully, I did a better job of patching than I did of noticing which
} message's headers I was reading the X-Seq: from.
Not too bad, but I noticed that bash lets you quote the leading # or %
like this: ${foo/\\$pat/$repl}
I think this handles it:
Index: Src/subst.c
===================================================================
--- subst.c 1999/04/02 11:26:29 1.23
+++ subst.c 1999/04/02 11:27:33
@@ -1371,6 +1371,8 @@
if (*s == '%')
flags |= SUB_END;
s++;
+ } else if (*s == '\\') {
+ s++;
}
}
}
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author