From: Steve Talley <stephen.talley@sun.com>
To: zsh-users@sunsite.auc.dk
Subject: Anonymous array indexing
Date: Tue, 12 Dec 2000 18:41:56 -0700 [thread overview]
Message-ID: <20001212184156.I11810@rmtc> (raw)
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
next reply other threads:[~2000-12-13 1:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-13 1:41 Steve Talley [this message]
2000-12-13 4:04 ` Dan Nelson
2000-12-13 4:06 ` Bart Schaefer
2000-12-13 17:05 ` Steve Talley
2000-12-13 17:39 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20001212184156.I11810@rmtc \
--to=stephen.talley@sun.com \
--cc=zsh-users@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).