From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13362 invoked by alias); 5 Dec 2014 12:32:52 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33855 Received: (qmail 8055 invoked from network); 5 Dec 2014 12:32:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1417782354; bh=7wqEnA7MDJoMM1kUhE2EJfhypv7SeMP6p0wcwQr5ybg=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=PLcXN2/0/e9dDUJifsqhSgjSXen1PjAMY2crG+4l2ppNpYpND27X4LeSimB5RqBv5dwUs6UN/GAuqiYOq4yZ+ORHQsuI8/YI4NausbtdiX8ogSUesSLRImwQtH94r8E126vDUHMiD41Q4kVriqIjhxBTrR9HpB6bMcQMNunzXI2IGqZ2p8vL2J7NDiT9mtrbX9jsyBQ/EYmyi0ukkPulfkkcrgefVL7d0CA83FaYnTUSmEVF1FSx6NIn0nDVQ/gk8K2bwsdPzFOjUAXXTY4+kjVkNcQhT/ESuAgnxNc5sPvKxv4Q2lPtdf3ZOTJwG86EJzfChCX7jyqttAI+LsoBuA== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.co.uk; b=udjid4/6+PRRVVOvWclLM7sHRFvkYjvAvxDSY1FaZ1l3LApZGA924ntCg/hGQ5OlrmJGn1fmgm9yMNnpcYzo70beJo/Z1pKKpl0ynzaBUNCZBJm2LY3YNoHQgdVvyRjudg6iw7KE8yIey9P1psJwaHh0a2qvFQM/UVgfXLeKcPqrnG3+kz38s52oi1GIJGkbCkouyfN003ft+Rp6cX6BBcUpttJljdgZnqolvKbKWduFWGeUz+ToF3R+ZdxmH7FgwbkqOsDyvtoerztZyTp3qP8VpYEP1Hi0+6fQ71TdEIRcA+M1ITqNB1owbcgur5P9lMD5yOWRvGCejuYLe9H18A==; X-Yahoo-Newman-Id: 29581.25753.bm@smtp102.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: j34wChwVM1mbV9wBg77fPUCnkxuqKlrVpfh4.cOYTVeatJ. lOVJN8FpH3UASRlp8BTqFbLcAYgAlacJXoI.cdG4GtIo3E.I08djchcZzgN2 _550AQxgDnYVAyov8Ta_dNpCAf.c3hCCNgMd1DclJgwbc7jJhO0.y7Y1d4jJ izr1y.RJfyfiNeK6kNwJMLCpafbJCZOrm9561.t9U4TN9kv8d5Q.Zppsfojp LJhIrqaVA8KKg90.vsFUx_hpV_n2s0Ii1StYmbbz_cf5Fo2Tugcy2_xUnjEq YaUO4mFDiHGYODjhbPiZ00rrz3XnKTaKN2eNj0.L1bJXGAcZpFqiPAhFlycW F0Er9LoIqsILuau4Tt5KUssAOmU3YK8d88CMY85Wm9gn_7BV6F6X3t2uAyUT cQVOIG1_xrVXwjhysplAbvVOigq20d3FNMEfcLuRYoNgKsP70RlMX3ylpx.m 8rBKTJb.rPhOZEEjIwEMfZEvR1VKy.0mcUibH5AVj6tfM1vBu68.uun08cqR f1jspEmILDB07W3a0z.g56F_h_rcttA-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: From: Oliver Kiddle References: <141203205120.ZM7564@torch.brasslantern.com> To: zsh workers Subject: Re: PATCH: Explain array append a bit better MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20838.1417781475.1@thecus.kiddle.eu> Date: Fri, 05 Dec 2014 13:25:52 +0100 Message-ID: <20905.1417782352@thecus.kiddle.eu> Mikael Magnusson wrote: > Should we perhaps mention array prepending somewhere too? I read the > sections "Array Subscripts" and "Array Element Assignment", and > searched for the string 1,0 and came up with nothing. I think that was left undocumented intentionally in the first place. I could be wrong but, in the code, it looks like behaviour that fell out of the implementation rather than something that was designed in. It isn't exactly nice and I wouldn't ever use it in scripts. Interactively, I have an abbreviation for it that I rarely use but also have aliases like: alias -- +fpath='fpath=( ~+ $fpath)' I don't really have an opinion either way on whether we should document it now. I'd prefer to see some other syntax introduced. When we last discussed prepending (30962), []= was the best suggestion we had but needs to touch the current subscript code so is trickier to to implement. -= ^= and /= were rejected before. Another option that occurs to me now is +var=( ... ) Oliver