zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: apoindex@aoc.nrao.edu, zsh-workers@sunsite.auc.dk
Subject: Re: order of processing in brace expansion
Date: Fri, 11 May 2001 13:09:47 -0700	[thread overview]
Message-ID: <010511130947.ZM5782@candle.brasslantern.com> (raw)
In-Reply-To: <yu9vgn7wv0o.fsf@cato.aoc.nrao.edu>

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   


      reply	other threads:[~2001-05-11 20:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-27 17:31 Allan Poindexter
2001-04-27 18:09 ` Peter Stephenson
2001-04-28  6:05   ` Bart Schaefer
2001-04-28 18:17     ` Bart Schaefer
2001-05-02  9:50     ` Peter Stephenson
2001-05-02 14:59       ` Bart Schaefer
2001-05-02 15:28         ` Peter Stephenson
2001-05-02 16:30           ` Bart Schaefer
2001-05-09  9:06             ` Peter Stephenson
2001-05-11 16:57               ` Allan Poindexter
2001-05-11 19:22             ` Allan Poindexter
2001-05-11 20:09               ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=010511130947.ZM5782@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=apoindex@aoc.nrao.edu \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).