Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
parameter expansion, substitution
- X-seq: zsh-workers 30334
- From: "S. Cowles" <scowles@xxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: parameter expansion, substitution
- Date: Fri, 9 Mar 2012 14:03:29 -0800 (PST)
- Authentication-results: cm-omr5 smtp.user=scowles@xxxxxxxx; auth=pass (CRAM-MD5)
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
i am not getting expected results in the following code snippet:
b="abc" ; b=${b/#abc%/d} ; echo ${b}
i expect the value of b to be changed to "d"; however, it remains "abc".
the following snippet does give the expected result:
b="abc" ; b=${b/#abc/d} ; echo ${b}
for this session, the following shell options are set: interactive monitor
shinstdin zle. the version of the shell being used is 4.3.17-dev-0,
patchlevel 1.5604.
in my use case, i need to specify a pattern match at the end of the
parameter. have i misunderstood the syntax of the '%' end-of-string
operator? or is this problem something else?
thanks for any help.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author