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 7067
- 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:41:41 +0100
- Cc: Zsh users list <zsh-users@xxxxxxxxxx>
- In-reply-to: <545.1077211474@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: <20040219171439.GB2941@DervishD> <545.1077211474@xxxxxxx>
Hi Peter :)
* Peter Stephenson <pws@xxxxxxx> dixit:
> DervishD wrote:
> > 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'...).
> I presume because you're sensible enough not to have sh_word_split set.
When I first used Zsh, I had the option set, since I was more
familiar with that behaviour, but I unsetted it soon ;)
> array=("${array[@}" "$newitem")
> which is what you'd have to do in bash.
And that was the notation I spected ;) I just didn't remember how
Zsh does word splitting ;)
> By the way, in 4.1 you can now do
> array+=($newitem)
Nice!
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