zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: Forcing expansion without explicit eval nor a subshell?
Date: Sat, 05 Nov 2005 21:33:14 +0000	[thread overview]
Message-ID: <1051105213315.ZM24679@candle.brasslantern.com> (raw)
In-Reply-To: <m3d5lezwu7.fsf@asfast.com>

On Nov 5,  3:03pm, Lloyd Zusman wrote:
}
} I want to defer it in case I do this:
} 
}   yumargs='--disablerepo={dag,$livnastuff}'
} 
} ... where $livnastuff can change, and where it might or might not
} involve more brace expansions.

The answer is still to stop thinking about brace expansions and start
thinking about array expansions.

    yumargs=( --disablerepo={dag,'$^livnastuff'} )
    livnastuff=( dries extras )
    yum ${(e)yumargs}

You can keep abstracting this out:

    reponames=( dag '$^livnastuff' )
    yumargs=( --disablerepo=$^reponames )
    livnastuff=( dries extras )
    yum ${(e)yumargs}

Or

    pkgnames=( kernel '$^livnapkgs' )
    reponames=( dag '$^livnarepos' )
    yumargs=( --exclude='${(e)^pkgnames}' --disablerepo='${(e)^reponames}' )
    livnarepos=( dries extras )
    yum ${(e)yumargs}


  reply	other threads:[~2005-11-05 21:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-05  4:01 Lloyd Zusman
2005-11-05  8:45 ` DervishD
2005-11-05 19:56 ` Bart Schaefer
2005-11-05 20:03   ` Lloyd Zusman
2005-11-05 21:33     ` Bart Schaefer [this message]
2005-11-05 22:07       ` Lloyd Zusman
2005-11-05 22:44         ` OT: poldek [Re: Forcing expansion without explicit eval nor a subshell?] GoTaR
2005-11-06  3:02         ` Forcing expansion without explicit eval nor a subshell? Bart Schaefer
2005-11-06  3:40           ` Lloyd Zusman

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=1051105213315.ZM24679@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.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).