From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25189 invoked by alias); 2 Nov 2015 23:32:02 -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: 20884 Received: (qmail 23216 invoked from network); 2 Nov 2015 23:32:02 -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=l68f1DKb1juvx12Qjr0A:9 a=pILNOxqGKmIA:10 Message-id: <5637EB66.9050301@eastlink.ca> Date: Mon, 02 Nov 2015 15:01:58 -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> <151102130518.ZM17830@torch.brasslantern.com> In-reply-to: <151102130518.ZM17830@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 11/02/2015 01:05 PM, Bart Schaefer wrote: > } > typeset -g "${1}[$2]=$3" # quotes so [ ] isn't globbing > In the above, > > set_v ary idx val > > is going to invoke > > typeset -g ary[idx]=val > > Ordinarly "typeset" inside a function body behaves like "local". The > -g option tells it not to do that, so that the name "ary" is taken to > come from the calling context instead of the current function context. I don't understand. The idea of context here is new to me. Why is 'ary' not a variable like any other? > } BTW, as a point of list etiquette: Responding to most posts I let my > } lines wrap > } but resonding to yours, which seem to alway have fixed line width, I try to > } match that style, but looking at the returned posts from the list, they > } sometimes > } sproing badly. Should I try to keep to your width, or just let lines wrap? > > The above is what your text would look like if I didn't run it through > a reformatter. It Used To Be that everyone assumed text should be > folded to be readable on an 80-column display, which, as a guy still > using the email program I wrote myself 20 years ago, I still do. Then > along came HTML format email, and everybody assumed text should never be > wrapped at all (let the reader's UI deal with it). Except there's still > this pesky thing about mailing lists preferring plain text, so we end up > with a hypbrid where text as you write it is folded to be readable at > whatever your display width is set, but then it gets re-folded to 80 > when you send it -- except that it also keeps any real newlines you > entered, so if you were actually trying to make it look nice, it ends > up like the above instead. Yes. Very unfortunate. > > Exactly what you SHOULD do depends on what you're using to write your > email. In Thunderbird you should probably put literal line breaks only > at the ends of paragraphs, and let it wrap other stuff as it wills. Ok. Gotta get a better program, I hate Tbird. >