From: Vincent Lefevre <vincent@vinc17.org>
To: Zsh users list <zsh-users@sunsite.dk>
Subject: Re: assigning parameters and globbing
Date: Thu, 6 Apr 2006 01:18:20 +0200 [thread overview]
Message-ID: <20060405231820.GQ1327@prunille.vinc17.org> (raw)
On 2006-04-05 08:00:56 -0700, Bart Schaefer wrote:
> files=(*) eval 'export BLAH=$files[-1]'
This would perhaps be more efficient:
files=(*([-1])) eval 'export BLAH=$files'
Or perhaps I could reuse my old setenv function:
setenv() { export "$1=$2" }
setenv BLAH *([-1])
I wonder why there isn't something similar in standard to avoid the "="
in assignments, e.g. a typeset option -e: export -e BLAH *([-1])
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
next reply other threads:[~2006-04-05 23:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-05 23:18 Vincent Lefevre [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-04-06 12:16 Vincent Lefevre
2006-04-06 9:27 Peter Stephenson
2006-04-05 15:00 Bart Schaefer
2006-04-05 9:24 Peter Stephenson
2006-04-04 22:34 Vincent Lefevre
2006-04-04 12:58 Peter Stephenson
2006-04-04 12:01 Vincent Lefevre
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=20060405231820.GQ1327@prunille.vinc17.org \
--to=vincent@vinc17.org \
--cc=zsh-users@sunsite.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).