From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6035 invoked from network); 11 May 2001 20:11:34 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 May 2001 20:11:34 -0000 Received: (qmail 12809 invoked by alias); 11 May 2001 20:11:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14319 Received: (qmail 12794 invoked from network); 11 May 2001 20:11:10 -0000 From: "Bart Schaefer" Message-Id: <010511130947.ZM5782@candle.brasslantern.com> Date: Fri, 11 May 2001 13:09:47 -0700 In-Reply-To: Comments: In reply to Allan Poindexter "Re: order of processing in brace expansion" (May 11, 1:22pm) References: <1010502163010.ZM15909@candle.brasslantern.com> X-Mailer: Z-Mail Lite (5.0.0 30July97) To: apoindex@aoc.nrao.edu, zsh-workers@sunsite.auc.dk Subject: Re: order of processing in brace expansion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 11, 1:22pm, Allan Poindexter wrote: > > I don't see any way to parameterize patterns for brace expansion if > this is [not] done. (E.g. setting a parameter in a script to a pattern > that will be used in brace expansion in several places and which may > need to be changed from time to time. IMO is a good thing to be able > to do). Am I overlooking something? Is there some other way to do > this? Brace expansion is completely equivalent to expanding an array parameter with rc_expand_param set. So instead of alternates=x,y,z echo foo/{$alternates}/bar you do alternates=(x y z) echo foo/$^alternates/bar -- 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