* Bad "bad pattern" in ${foo//pat/repl} ?
@ 2002-07-13 21:35 Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2002-07-13 21:35 UTC (permalink / raw)
To: zsh-workers
(Never mind why the elements of $foo have spaces in them, I was fooling
with something else when I came across this.)
schaefer<501> foo=("a b" "a c" "b q" "x y")
schaefer<502> echo ${foo/#a*/yes}
yes yes b q x y
schaefer<503> echo ${foo//#a*/yes}
a b a c b q x y
schaefer<504> setopt extendedglob
schaefer<505> echo ${foo/#a*/yes}
yes yes b q x y
schaefer<506> echo ${foo//#a*/yes}
zsh: bad pattern: #a*
Surely both 503 and 506 are bugs (probably the same bug). One should be able
to anchor to the beginning of the string even when doing a replace-all (I do
admit it doesn't really make sense to do so, but ...).
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-07-13 21:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-13 21:35 Bad "bad pattern" in ${foo//pat/repl} ? 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).