From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25216 invoked by alias); 2 Nov 2015 03:33:56 -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: 20871 Received: (qmail 23078 invoked from network); 2 Nov 2015 03:33:55 -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 autolearn=ham autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=T/C1EZ6Q c=1 sm=1 tr=0 a=hFxs0f5JAArYXmzDxhrHQA==:117 a=hFxs0f5JAArYXmzDxhrHQA==:17 a=N659UExz7-8A:10 a=27aPDL040jG9kkvgSVkA:9 a=pILNOxqGKmIA:10 Message-id: <5636D99F.2030807@eastlink.ca> Date: Sun, 01 Nov 2015 19:33:51 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: easy calling of associative array? References: <56369C7B.2030604@eastlink.ca> <1237641446422150@web6m.yandex.ru> <5636B333.8060300@eastlink.ca> <151101190842.ZM16752@torch.brasslantern.com> In-reply-to: <151101190842.ZM16752@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 11/01/2015 07:08 PM, Bart Schaefer wrote: > - ${(P)${:-${ref}[idx]}} then treats that substitution as another > parameter expansion, and you end up where you wanted to be. Deus avertat. But what would prevent this from being parsed?: ${${ref}[idx]} or even: ${${ref}[$idx]} ... since an expansion can be used in the back end just fine already. I dunno, but the above seems at least naively straight forward. Also, that form works with normal arrays. But if you say it can't work that way I can't say otherwise, of course.