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

${=variable} doesn't always produce an array -- why?



Is there any way to cause a scalar to be interpreted as an array regardless
of the number of words it contains?  Consider:

zsh% one="one"
zsh% two="one two"
zsh %echo ${${=one}[1]} ${${=two}[1]}
o one

This seems unintuitive to me.  I was expecting to get the entire word "one"
in both cases.

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



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