From: DervishD <raul@pleyades.net>
To: Peter Stephenson <pws@csr.com>
Cc: Zsh users list <zsh-users@sunsite.dk>
Subject: Re: Can this be done with an array parameter?
Date: Thu, 19 Feb 2004 18:14:39 +0100 [thread overview]
Message-ID: <20040219171439.GB2941@DervishD> (raw)
In-Reply-To: <23897.1077210054@csr.com>
Hi Peter :)
* Peter Stephenson <pws@csr.com> dixit:
> > And my original question: can the array be assigned one line of
> > the file per slot without the loop?
> array=(${(f)"$(<filename)"})
Yes :( I should have remembered this... A very intelligent, easy
an elegant solution. Thanks a lot for the help :))
> There are lots of examples like this in the completion code, except most
> are about fifty times more complicated.
And its logical: I should have took a look at the completion
code, since it processes a lot of files. I just didn't thought of it,
sorry for the noise :((
Anyway I'm still stunned by the first example I put, the
assignment to the array in the form array=($array $newitem) Why Zsh
quotes correctly? (I should define 'correctly' as 'the way I
wanted'...).
Again, thanks for your answer :)
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/
next prev parent reply other threads:[~2004-02-19 17:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-19 16:46 DervishD
2004-02-19 17:00 ` Peter Stephenson
2004-02-19 17:14 ` DervishD [this message]
2004-02-19 17:24 ` Peter Stephenson
2004-02-19 17:41 ` DervishD
2004-02-19 17:16 ` Bart Schaefer
2004-02-19 17:27 ` DervishD
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=20040219171439.GB2941@DervishD \
--to=raul@pleyades.net \
--cc=pws@csr.com \
--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).