From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9330 invoked from network); 13 Oct 2000 18:24:26 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Oct 2000 18:24:26 -0000 Received: (qmail 16177 invoked by alias); 13 Oct 2000 18:23:38 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3454 Received: (qmail 16162 invoked from network); 13 Oct 2000 18:23:37 -0000 From: "Bart Schaefer" Message-Id: <1001013182323.ZM5486@candle.brasslantern.com> Date: Fri, 13 Oct 2000 18:23:23 +0000 In-Reply-To: <20001013104819.A32478@stocks.pillory.com> Comments: In reply to "Jack McKinney" "converting parameter to words" (Oct 13, 10:48am) References: <20001013104819.A32478@stocks.pillory.com> In-Reply-To: Comments: In reply to Nemeth Ervin "Re: converting parameter to words" (Oct 13, 6:16pm) X-Mailer: Z-Mail (5.0.0 30July97) To: "Jack McKinney" , zsh-users@sunsite.auc.dk Subject: Re: converting parameter to words MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 13, 10:48am, Jack McKinney wrote: } } for i } do } temp="$temp -r $i" } done } } command $temp } } From the man page, it sounds like ${^temp} or ${=temp} should } work, but neither does. ${=temp} should have done it for you: zagzig[562] x="foo -r bar -r baz" zagzig[563] print -l ${=x} foo -r bar -r baz However, it would do the wrong thing if any of the original arguments contained whitespace. On Oct 13, 6:16pm, Nemeth Ervin wrote: } } for i in ... } do } temp=("$temp[@]" -r "$i") } done } } command "$temp[@]" This is the right idea. Unless you have shwordsplit set (which you must not, or you wouldn't have needed ${=temp} in the first place) you don't even need the quotes that Nemeth used; and unless you have shortloops turned off you can just write it like this: local temp i for i; temp=($temp -r $i) command $temp -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net