Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
${=variable} doesn't always produce an array -- why?
- X-seq: zsh-workers 4068
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: ${=variable} doesn't always produce an array -- why?
- Date: Tue, 9 Jun 1998 12:41:58 -0700
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