From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6864 invoked by alias); 2 Nov 2015 23:20:55 -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: 20883 Received: (qmail 13368 invoked from network); 2 Nov 2015 23:20:52 -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=X+5rdgje c=1 sm=1 tr=0 a=hFxs0f5JAArYXmzDxhrHQA==:117 a=hFxs0f5JAArYXmzDxhrHQA==:17 a=N659UExz7-8A:10 a=tQUARpEOlmWT7jEwj-EA:9 a=pILNOxqGKmIA:10 a=JWCEg0fP3ucA:10 Message-id: <5637E8C8.6020700@eastlink.ca> Date: Mon, 02 Nov 2015 14:50:48 -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> <5636D99F.2030807@eastlink.ca> <151101225100.ZM16882@torch.brasslantern.com> <563784B5.3040901@eastlink.ca> <151102082808.ZM17640@torch.brasslantern.com> <5637AC27.8010007@eastlink.ca> <280101446493068@web5o.yandex.ru> <151102141036.ZM17876@torch.brasslantern.com> In-reply-to: <151102141036.ZM17876@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 11/02/2015 02:10 PM, Bart Schaefer wrote: > echo_v () { > [[ -n $1 ]] && (( ${(P)+1} )) && > print -R "${(P)${:-${1}[${(b)2}]}}" > } > > get_v () { > [[ -n $1 && $3 != *=* ]] && (( ${(P)+1} )) && > typeset -g "${3:-REPLY}=${(P)${:-${1}[${(b)2}]}}" > } > As Peter once observed, there are no obfuscated code contests in zsh ;-)