Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
trivial question
- X-seq: zsh-users 28476
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: trivial question
- Date: Sun, 4 Dec 2022 18:05:06 -0800
- Archived-at: <https://zsh.org/users/28476>
- List-id: <zsh-users.zsh.org>
Running this:
var=( "now is" "the time" "for all good" "men to" )
echo var[2] ain\'t nothing
echo var2] ain\'t nothing
echo "var[2]"
echo $var[2]
... I get this:
4 /aWorking/Zsh/Source/Wk 0 $ . test1
ain't nothing
var2] ain't nothing
var[2]
the time
... It hardly matters but I'm curious that 'var[2]' without the dollar
sign evaluates to nothing at all. I have zero need for it to do
otherwise still I'm mildly expecting it to just end up as a plain string
the same way 'var2]' does. Seems strange that it evaporates entirely.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author