Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Can this be done with an array parameter?
- X-seq: zsh-users 7063
- From: DervishD <raul@xxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: Can this be done with an array parameter?
- Date: Thu, 19 Feb 2004 18:14:39 +0100
- Cc: Zsh users list <zsh-users@xxxxxxxxxx>
- In-reply-to: <23897.1077210054@xxxxxxx>
- Mail-followup-to: Peter Stephenson <pws@xxxxxxx>, Zsh users list <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Pleyades
- References: <20040219164631.GB2804@DervishD> <23897.1077210054@xxxxxxx>
Hi Peter :)
* Peter Stephenson <pws@xxxxxxx> 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/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author