Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Parameter expansion oddity in 3.1.5-pws-20



zagzig% x="$(<config.h)"
zagzig% y=( ${(f)"$(<config.h)"} )
zagzig% echo $#y
423
zagzig% z=( ${(f)"${x}"} )
zagzig% echo $#z
423

So far so good.

zagzig% z=( ${(f)"$x"} )
zagzig% echo $#z
1
zagzig% echo $z
8769

Eh?  Where did THAT come from?  Oh, 8679 is $$, so that latter is being
parsed as ${(f)$} ... the x is ignored.  That was sort of understandable
when you couldn't use quotes there, but with the quotes it's confusing.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author