From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: "Lawrence Velázquez" <vq@larryv.me>
Cc: acs@alumni.princeton.edu, ethersoft@gmail.com, zsh-workers@zsh.org
Subject: Re: Help with associative arrays
Date: Tue, 23 Aug 2016 16:54:16 +0100 [thread overview]
Message-ID: <20160823155416.GA9825@chaz.gmail.com> (raw)
In-Reply-To: <2D3937A2-41B0-4B31-90D9-3C91D0DFFB92@larryv.me>
2016-08-21 17:18:11 -0400, Lawrence Velázquez:
[...]
> The second difference is that a double-quote (`"') may appear as
> part of a subscript expression without being preceded by
> a backslash....
[...]
An annoying consequence is that (contrary to with ksh93) you can't do:
a[""]=foo
To assign an element for the empty key. You have to do things
like:
a[${}]=foo
or
a+=('' foo)
instead.
It would be nice if one could do:
a[]=foo
(which currently returns an error)
Note that it's a lot worse in bash. bash associative arrays
can't have an element with an empty key!
--
Stephane
prev parent reply other threads:[~2016-08-23 15:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-21 20:50 Vin Shelton
2016-08-21 21:18 ` Lawrence Velázquez
2016-08-22 11:53 ` Vin Shelton
2016-08-23 15:54 ` Stephane Chazelas [this message]
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=20160823155416.GA9825@chaz.gmail.com \
--to=stephane.chazelas@gmail.com \
--cc=acs@alumni.princeton.edu \
--cc=ethersoft@gmail.com \
--cc=vq@larryv.me \
--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).