zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: [key]+=val
Date: Mon, 25 Sep 2017 10:53:25 -0700	[thread overview]
Message-ID: <CAH+w=7Zb0MWChwWBxGgU17ibMVACoWMsLNtMwETFBwukgZ0yZQ@mail.gmail.com> (raw)
In-Reply-To: <20170925113509.25c2703e@pwslap01u.europe.root.pri>

On Mon, Sep 25, 2017 at 3:35 AM, Peter Stephenson
<p.stephenson@samsung.com> wrote:
>
> foo=([key]+=val)
>
> doesn't (just creates the value), because you're starting with an empty
> set of values in foo so there's nothing to append to.  Does this sound
> reasonable?  It's a messy layering violation otherwise so it would need
> a good reason to do it differently.

Ksh says:

$ typeset -A foo
$ foo=([samekey]+=val [samekey]+=ue [samekey]+=grows)
$ typeset -p foo
typeset -A foo=([samekey]=valuegrows)


  reply	other threads:[~2017-09-25 17:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170925103513eucas1p2b7d91180ccc6defe455daca9248ae222@eucas1p2.samsung.com>
2017-09-25 10:35 ` [key]+=val Peter Stephenson
2017-09-25 17:53   ` Bart Schaefer [this message]
2017-09-26  9:32     ` [key]+=val Peter Stephenson
2017-09-26 17:28       ` [key]+=val Bart Schaefer
2017-09-27  8:42         ` [key]+=val Peter Stephenson
2017-09-27  8:59           ` [key]+=val Peter Stephenson
2017-09-27 16:22           ` [key]+=val Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Zb0MWChwWBxGgU17ibMVACoWMsLNtMwETFBwukgZ0yZQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).