From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26186 invoked from network); 5 Nov 2005 19:57:10 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 5 Nov 2005 19:57:10 -0000 Received: (qmail 62934 invoked from network); 5 Nov 2005 19:56:57 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Nov 2005 19:56:57 -0000 Received: (qmail 15933 invoked by alias); 5 Nov 2005 19:56:47 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9643 Received: (qmail 15924 invoked from network); 5 Nov 2005 19:56:46 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Nov 2005 19:56:46 -0000 Received: (qmail 61252 invoked from network); 5 Nov 2005 19:56:46 -0000 Received: from vms040pub.verizon.net (206.46.252.40) by a.mx.sunsite.dk with SMTP; 5 Nov 2005 19:56:45 -0000 Received: from candle.brasslantern.com ([71.116.81.225]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IPH00LDWZEIOFC0@vms040.mailsrvcs.net> for zsh-users@sunsite.dk; Sat, 05 Nov 2005 13:56:44 -0600 (CST) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id jA5JufYm024495; Sat, 05 Nov 2005 11:56:41 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id jA5JueTI024494; Sat, 05 Nov 2005 11:56:40 -0800 Date: Sat, 05 Nov 2005 19:56:40 +0000 From: Bart Schaefer Subject: Re: Forcing expansion without explicit eval nor a subshell? In-reply-to: To: Lloyd Zusman , zsh-users@sunsite.dk Message-id: <1051105195640.ZM24493@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: Comments: In reply to Lloyd Zusman "Forcing expansion without explicit eval nor a subshell?" (Nov 4, 11:01pm) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 On Nov 4, 11:01pm, Lloyd Zusman wrote: } Subject: Forcing expansion without explicit eval nor a subshell? } } Suppose I have the following variable defined: } } yumargs='--disablerepo=livna{,-updates,-testing,-extras}' } } I want to assign to "yumargs" exactly as I did above, if possible, and } I'm looking for some combination of modifiers within the ${} construct } which would give me the expansion of "yumargs" that I desire, and } without the need for a subshell. And I'd like the expansion of } "yumargs" to take place at the time it is used in the "yum" command, not } at the time that I define it. } } Is all this possible? If so, could someone give me a hint or pointer? Given all the restrictions you've placed, no, it's not possible. There is no parameter-expansion modifier to force brace expansion. If you relax the "exactly as above" restriction, you could do this: yumargs=( --disablerepo=livna{,-updates,-testing,-extras} ) That is, make yumargs be an array of four strings rather than a single string that contains a brace expression. I'm unable to see a reason why it would matter when the brace expansion is performed; but if you think it's important to defer it, you're going to be stuck with eval.