zsh-workers
 help / color / mirror / code / Atom feed
* parameter expansion, substitution
@ 2012-03-09 22:03 S. Cowles
  2012-03-09 22:25 ` Mikael Magnusson
  2012-03-09 22:27 ` Bart Schaefer
  0 siblings, 2 replies; 4+ messages in thread
From: S. Cowles @ 2012-03-09 22:03 UTC (permalink / raw)
  To: zsh-workers

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-09 22:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-09 22:03 parameter expansion, substitution S. Cowles
2012-03-09 22:25 ` Mikael Magnusson
2012-03-09 22:48   ` S. Cowles
2012-03-09 22:27 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).