From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2781 invoked from network); 5 Nov 2005 04:05: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 04:05:38 -0000 Received: (qmail 35616 invoked from network); 5 Nov 2005 04:05:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Nov 2005 04:05:27 -0000 Received: (qmail 4561 invoked by alias); 5 Nov 2005 04:05:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9641 Received: (qmail 4551 invoked from network); 5 Nov 2005 04:05:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Nov 2005 04:05:18 -0000 Received: (qmail 34529 invoked from network); 5 Nov 2005 04:05:18 -0000 Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by a.mx.sunsite.dk with SMTP; 5 Nov 2005 04:05:17 -0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EYFHz-0002cU-FS for zsh-users@sunsite.dk; Sat, 05 Nov 2005 05:04:23 +0100 Received: from hippo.e-hippo.net ([216.182.10.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 05 Nov 2005 05:04:23 +0100 Received: from ljz by hippo.e-hippo.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 05 Nov 2005 05:04:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: Lloyd Zusman Subject: Forcing expansion without explicit eval nor a subshell? Date: Fri, 04 Nov 2005 23:01:54 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: hippo.e-hippo.net User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:OciZruYm0n7/8xY5QArAzEmbDLY= Sender: news 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=BAYES_00 autolearn=ham version=3.0.4 Suppose I have the following variable defined: yumargs='--disablerepo=livna{,-updates,-testing,-extras}' I know that I can do this: eval yum ${yumargs} update And this: yum $(eval print -- ${yumargs}) update In both cases, it expands to this before execution (line wrapping added for clarity): yum --disablerepo=livna \ --disablerepo=livna-updates \ --disablerepo=livna-testing \ --disablerepo=livna-extras \ update However, I'm wondering if there is a way to get the same effect without explicitly using "eval" and without invoking a subshell via the $() construct (nor with its moral equivalent, ``). 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? By the way, I tried the (e) operator within the ${} construct, but that didn't work for me. Thanks in advance for your suggestions. -- Lloyd Zusman ljz@asfast.com God bless you.