From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18904 invoked from network); 24 Jan 2004 02:37:18 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 24 Jan 2004 02:37:18 -0000 Received: (qmail 1786 invoked by alias); 24 Jan 2004 02:36:49 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7016 Received: (qmail 1776 invoked from network); 24 Jan 2004 02:36:48 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 24 Jan 2004 02:36:48 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.11.9.147] by sunsite.dk (MessageWall 1.0.8) with SMTP; 24 Jan 2004 2:36:47 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i0O2akP19076 for zsh-users@sunsite.dk; Fri, 23 Jan 2004 18:36:46 -0800 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1040124023645.ZM19075@candle.brasslantern.com> Date: Sat, 24 Jan 2004 02:36:45 +0000 In-Reply-To: <20040124005150.GA14079@descolada.dartmouth.edu> Comments: In reply to Omen Wild "Re: Build a variable name from another variable?" (Jan 23, 7:51pm) References: <20040123224220.GB3354@descolada.dartmouth.edu> <4011B29F.8040304@uk.ibm.com> <87oesugsnb.fsf@ceramic.fifi.org> <20040124005150.GA14079@descolada.dartmouth.edu> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh users Subject: Re: Build a variable name from another variable? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 23, 7:51pm, Omen Wild wrote: } } Quoting Philippe Troin on Fri, Jan 23 15:19: } > } > % t="${baz}contents" } > % echo ${${(P)t}} } > bar contents } > } > Works... } > i could not manage to do it without an intermediate variable. } } Ah, this will probably work for me. Here it is without the intermediate variable: ${(P)${:-${baz}contents}}