Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] (final) unset "array[$anything]"
- X-seq: zsh-workers 49072
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] (final) unset "array[$anything]"
- Date: Mon, 14 Jun 2021 11:04:23 +0200
- Archived-at: <https://zsh.org/workers/49072>
- In-reply-to: <CAH+w=7bNoRWUz6ZsUi9wZivfm1q8veD2d7Ld4jn_8qRJ+EmiBQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7bNoRWUz6ZsUi9wZivfm1q8veD2d7Ld4jn_8qRJ+EmiBQ@mail.gmail.com>
On 6/14/21, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Here's the diff just for "literal" unset, omitting all the
> alternatives and omitting the problematic hunk that modified getasg().
>
> I've included a NEWS entry, but have not yet attempted to create an
> incompatibilities section for README since it's not clear what the
> next zsh version number will be.
+that result as the exact hash element to unset. This differs from previous
+versions of the shell, which would also remove a leading backslash for an
+unusual subset of characters in the expansion of $key. Note this also
+means, for example, that
+ unset 'hash[ab]cd]'
+unsets the element with key "ab]cd" rather than silently doing nothing.
It is somewhat unclear (without using my contextual knowledge) if the
"Note this" applies to the old or the new behavior. Perhaps "Note
this" can be replaced explicitly with "Note that the new behaviour" or
so. (or "unsets" on the last line could become "now unsets".)
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author