Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Anonymous array indexing
- X-seq: zsh-users 3560
- From: Steve Talley <stephen.talley@xxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Anonymous array indexing
- Date: Tue, 12 Dec 2000 18:41:56 -0700
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
Hello,
Is there a compact version of the following:
fred=(one two three)
export FRED=$fred[2]
unset fred
I am looking for something like
export FRED=(one two three)[2]
so that I can avoid having to use the temporary variable fred.
The above doesn't work. Is there something equivalently short I
can use? I'm running zsh 3.1.9.
Thanks,
Steve
Messages sorted by:
Reverse Date,
Date,
Thread,
Author