From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21219 invoked from network); 19 Feb 2004 17:45:21 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Feb 2004 17:45:21 -0000 Received: (qmail 24839 invoked by alias); 19 Feb 2004 17:45:00 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7067 Received: (qmail 24827 invoked from network); 19 Feb 2004 17:44:59 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 19 Feb 2004 17:44:59 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.193.203.32] by sunsite.dk (MessageWall 1.0.8) with SMTP; 19 Feb 2004 17:44:58 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i1JHipe08554; Thu, 19 Feb 2004 18:44:51 +0100 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1AtsBB-0000nj-00>; Thu, 19 Feb 2004 18:41:41 +0100 Date: Thu, 19 Feb 2004 18:41:41 +0100 From: DervishD To: Peter Stephenson Cc: Zsh users list Subject: Re: Can this be done with an array parameter? Message-ID: <20040219174141.GD2941@DervishD> Mail-Followup-To: Peter Stephenson , Zsh users list References: <20040219171439.GB2941@DervishD> <545.1077211474@csr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <545.1077211474@csr.com> User-Agent: Mutt/1.4i Organization: Pleyades User-Agent: Mutt/1.4i Hi Peter :) * Peter Stephenson 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/