From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10051 invoked from network); 5 Nov 2005 21:33:38 -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 21:33:38 -0000 Received: (qmail 24432 invoked from network); 5 Nov 2005 21:33:30 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Nov 2005 21:33:30 -0000 Received: (qmail 2827 invoked by alias); 5 Nov 2005 21:33:23 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9645 Received: (qmail 2818 invoked from network); 5 Nov 2005 21:33:23 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Nov 2005 21:33:23 -0000 Received: (qmail 23456 invoked from network); 5 Nov 2005 21:33:23 -0000 Received: from vms046pub.verizon.net (206.46.252.46) by a.mx.sunsite.dk with SMTP; 5 Nov 2005 21:33:21 -0000 Received: from candle.brasslantern.com ([71.116.81.225]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IPI009SU3VJG5E8@vms046.mailsrvcs.net> for zsh-users@sunsite.dk; Sat, 05 Nov 2005 15:33:20 -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 jA5LXGoC024681 for ; Sat, 05 Nov 2005 13:33:17 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id jA5LXGO9024680 for zsh-users@sunsite.dk; Sat, 05 Nov 2005 13:33:16 -0800 Date: Sat, 05 Nov 2005 21:33:14 +0000 From: Bart Schaefer Subject: Re: Forcing expansion without explicit eval nor a subshell? In-reply-to: To: zsh-users@sunsite.dk Message-id: <1051105213315.ZM24679@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <1051105195640.ZM24493@candle.brasslantern.com> Comments: In reply to Lloyd Zusman "Re: Forcing expansion without explicit eval nor a subshell?" (Nov 5, 3:03pm) 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 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}