From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4191 invoked by alias); 14 Jan 2013 18:36:57 -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: 30968 Received: (qmail 813 invoked from network); 14 Jan 2013 18:36:44 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at klanderman.net does not designate permitted sender hosts) From: Greg Klanderman To: zsh-workers@zsh.org Subject: Re: array prepend Reply-to: gak@klanderman.net Date: Mon, 14 Jan 2013 13:36:25 -0500 In-reply-to: <130113175023.ZM5855@torch.brasslantern.com> (Bart Schaefer's message of "Sun, 13 Jan 2013 17:50:23 -0800") Message-id: <87mwwbfw7q.fsf@lwm.klanderman.net> User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux) References: <50EFB80D.30002@sergio.spb.ru> <22417.1357954693@thecus.kiddle.eu> <20130113185141.4394d532@pws-pc.ntlworld.com> <130113175023.ZM5855@torch.brasslantern.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii >>>>> On January 13, 2013 Bart Schaefer wrote: > What about a special case for empty brackets? VAR[] is not currently > a valid identifier even though e.g. VAR[*] is. > VAR[]=(this is prepended) So that's the same as VAR[1,0]=(...) ? It doesn't really "look" very much like prepend to me. > VAR[]+=(this is appended) > VAR+=(short for 'VAR[]+=') Does VAR+=($x) differ at all from VAR+=$x if VAR is an array? I was thinking of maybe '++=' for prepend, the double '+' weighting towards the front. Greg