Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Help with associative arrays
- X-seq: zsh-workers 39091
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Lawrence Velázquez <vq@xxxxxxxxx>
- Subject: Re: Help with associative arrays
- Date: Tue, 23 Aug 2016 16:54:16 +0100
- Cc: acs@xxxxxxxxxxxxxxxxxxxx, ethersoft@xxxxxxxxx, zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=n1X7lMV3U8Lsvr3SfGusbiL8I4J6z/CXc7Unp+RnCrc=; b=Liuo21ns53J+vP50rkjySXO9CQ7E+2nkiOoYBxPALBlkHYirFqA8sW1pFDG2C3ukhq rNdd4j/BLenEhhmEERsbPWUjzcobkkhzBshI/eipJmffL8a1sA6yVpcnStEW//DcBxW9 PdHwIVqV8FFaRz6upRgoOhcMb53sJU/sQt06VyGyogqI7gLtfU9+/Gp+Qob3Wt9rck5P 40fyuj+2qLGDK6Pv+ICysJvUm6uX4irOLtXLUTAu6avJwCk8I/KSCLlQcTHySa6ilr3L xYF5Slw4bb3VnKrhLt0N6hixXYvJENUtBs6hndsFnNJdLHiQNJUxfR34gS0Q7ba886B9 DHDw==
- In-reply-to: <2D3937A2-41B0-4B31-90D9-3C91D0DFFB92@larryv.me>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: Lawrence Velázquez <vq@xxxxxxxxx>, acs@xxxxxxxxxxxxxxxxxxxx, ethersoft@xxxxxxxxx, zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CACeGjnUfMEo5KtdMn=iiAVsfAJgjeVyk7vh+WFZgcyKeahBbnQ@mail.gmail.com> <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author