Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: order of processing in brace expansion
- X-seq: zsh-workers 14319
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: apoindex@xxxxxxxxxxxx, zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: order of processing in brace expansion
- Date: Fri, 11 May 2001 13:09:47 -0700
- In-reply-to: <yu9vgn7wv0o.fsf@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <Tc0a88d015346c05e98@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <1010502163010.ZM15909@xxxxxxxxxxxxxxxxxxxxxxx> <yu9vgn7wv0o.fsf@xxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author