From: Bart Schaefer <schaefer@brasslantern.com>
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: [key]+=val
Date: Tue, 26 Sep 2017 10:28:52 -0700 [thread overview]
Message-ID: <170926102852.ZM14158@torch.brasslantern.com> (raw)
In-Reply-To: <20170926103254.1670a650@pwslap01u.europe.root.pri>
On Sep 26, 10:32am, Peter Stephenson wrote:
}
} + local -A keyvalarray
} + keyvalarray=([1]=who [2]=anyway [1]+=is [1]+=that [1]+=mysterious [1]+=man)
} + print -rl -- ${(kv)keyvalarray}
} +0:Append to element of associative array on creation
} +>1
} +>whoisthatmysteriousman
} +>2
} +>anyway
} +
} + local -A keyvalhash
} + keyvalhash=([one]=hows [one]+=your [one]+=father [one]+=today)
} + print -rl -- ${(kv)keyvalhash}
} +0:Append to element of associative array on creation
} +>one
} +>howsyourfathertoday
Did you intend for both of those tests to use associative arrays?
next prev parent reply other threads:[~2017-09-26 17:28 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 ` [key]+=val Bart Schaefer
2017-09-26 9:32 ` [key]+=val Peter Stephenson
2017-09-26 17:28 ` Bart Schaefer [this message]
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=170926102852.ZM14158@torch.brasslantern.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).