From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9097 invoked by alias); 2 Nov 2015 06:51:07 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20872 Received: (qmail 26439 invoked from network); 2 Nov 2015 06:51:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern_com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=W5FmBzgd3RF6ZTFDUnwM1LuBQmel67qUCE0GG1E9FSY=; b=R+aQs1Cm1PJEiHexcX7Pfa116zKQ2v2z85d4THP99yHTahGVlIayFzIEcEl5W7sNA4 G8iedXI/PPm+e96qcEP/wZCD1ch0waKtkCttXrtZQIyPv7FlwoE1TRrj2WKZRpSGdZGF GP6ugWC07qV4Kb8Ko69mJanyMuSavzx3e/i4bFtGNyTK4gzWhelbDLmdn1ksSX+1NUqJ pOLYPgPH0B5vPBL7Q8KNPUPIilGaLb+K9X3I/86ZLnV9/OqqZFAJHmzTZ+yM9VZSXRiJ /9oSP5njJtxJKS9rZHSonvGOMrDQnvnwwEg/aNCpWkIRgDRLE8lO9fJQeHPvVNSIb1Uu nS8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=W5FmBzgd3RF6ZTFDUnwM1LuBQmel67qUCE0GG1E9FSY=; b=dA/ZifzNAlvT/+6zAEnoZeXBW2/xrrfuQ+JRGxAfviGICRIsmoekAQOE4+Kf6KGjZF 6HoGpOAqgz5G/7erk+nrZH2No4LaNeQe8BNatMYq8O/y7z/MidQD+2RRvb/breEJ0JW1 sskYhpMMVPif4bhhNnE3LSWDXM/1MuBlHAZPfKJu3Gkr4TBBVmky2vIy0BQhG54TUMdl NqUt21C98042t1Opils3/kMp1iA96zDH685Dm8Bay6ky6HBzzkO1GPkR2xVYmPsUGqmv CQ2GXKbReww7XMfjiLb05EW/76inhuIoGSHTiDH0wzdiI4eAmWLMT6ANQFbyI72DuiHO kCxw== X-Gm-Message-State: ALoCoQm/H+Y53KYiDpXKCuUB2KAsfpXaC6tkrSvD2YqD+AAaPdKpuXf3eV3RK/pZ5sxxUNux/RYb X-Received: by 10.182.129.138 with SMTP id nw10mr6446069obb.24.1446447063891; Sun, 01 Nov 2015 22:51:03 -0800 (PST) From: Bart Schaefer Message-Id: <151101225100.ZM16882@torch.brasslantern.com> Date: Sun, 1 Nov 2015 22:51:00 -0800 In-Reply-To: <5636D99F.2030807@eastlink.ca> Comments: In reply to Ray Andrews "Re: easy calling of associative array?" (Nov 1, 7:33pm) References: <56369C7B.2030604@eastlink.ca> <1237641446422150@web6m.yandex.ru> <5636B333.8060300@eastlink.ca> <151101190842.ZM16752@torch.brasslantern.com> <5636D99F.2030807@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: easy calling of associative array? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 1, 7:33pm, Ray Andrews wrote: } } But what would prevent this from being parsed?: } } ${${ref}[idx]} } ${${ref}[$idx]} Those both ARE parsed. The problem is, that form is defined to mean something different than what it would have to mean for it to work in (P) context. It's not a parsing issue. } Also, that form works with normal arrays. Presuming you mean ${${(P)ref}[idx]}, because it means something else if you leave out the (P) or put it somewhere else. Anyway, that's actually the point. ${(P)ref} resolves to the values of the array, and then the subscript is applied. Ask yourself: what are "the values of" an associative array, in every other context?