From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6079 invoked from network); 16 Sep 2006 05:57:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 Sep 2006 05:57:32 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 19331 invoked from network); 16 Sep 2006 05:57:24 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Sep 2006 05:57:24 -0000 Received: (qmail 1200 invoked by alias); 16 Sep 2006 05:57:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10724 Received: (qmail 1191 invoked from network); 16 Sep 2006 05:57:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 Sep 2006 05:57:18 -0000 Received: (qmail 18401 invoked from network); 16 Sep 2006 05:57:18 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 16 Sep 2006 05:57:17 -0000 Received: from torch.brasslantern.com ([71.116.118.106]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J5O00KZJ8J234X5@vms042.mailsrvcs.net> for zsh-users@sunsite.dk; Sat, 16 Sep 2006 00:57:03 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k8G5v1HU010303 for ; Fri, 15 Sep 2006 22:57:01 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k8G5v16h010302 for zsh-users@sunsite.dk; Fri, 15 Sep 2006 22:57:01 -0700 Date: Fri, 15 Sep 2006 22:57:01 -0700 From: Bart Schaefer Subject: Re: value of a key pointed by (P) ? In-reply-to: <20060915201704.GA14417@ulpmm.u-strasbg.fr> To: zsh-users@sunsite.dk Message-id: <060915225701.ZM10299@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable References: <20060915174734.GA14349@ulpmm.u-strasbg.fr> <20060915185628.4641deb7.pws@csr.com> <20060915201704.GA14417@ulpmm.u-strasbg.fr> Comments: In reply to Marc Chantreux "Re: value of a key pointed by (P) ?" (Sep 15, 10:17pm) On Sep 15, 10:17pm, Marc Chantreux wrote: } Subject: Re: value of a key pointed by (P) ? } } le 15/09/2006, } Peter Stephenson nous =E9crivait : } > The expression generated by ${(P)b} is passed back as an ordinary array, }=20 } isn't it a bug? No, it's not. ${(P)b} is "the value of the thing named by the value of b" and the value of the parameter a is an ordinary array consisting of all the values of the associative array. What you want are name references, that is, "the thing named by the value of b" (note the difference -- missing one "value of"). Zsh doesn't have those yet, and when it does they probably won't be implemented via parameter expansion flags. Also consider: b=3D"a[$k]" print ${(P)b}