Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _modutils: fix the testing of -R/--resolve-alias options as it is now, it is always true due to how $+var works with the k subscript flag on associative arrays
- X-seq: zsh-workers 49173
- From: Lawrence Velázquez <larryv@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] _modutils: fix the testing of -R/--resolve-alias options as it is now, it is always true due to how $+var works with the k subscript flag on associative arrays
- Date: Sun, 18 Jul 2021 18:46:16 -0400
- Archived-at: <https://zsh.org/workers/49173>
- In-reply-to: <28083-1625781916.764025@UCY6.UOU6.q2aH>
- List-id: <zsh-workers.zsh.org>
- References: <20210705051149.12522-1-llua@gmx.com> <28083-1625781916.764025@UCY6.UOU6.q2aH>
On Thu, Jul 8, 2021, at 6:05 PM, Oliver Kiddle wrote:
> On 5 Jul, Eric Cook wrote:
> > % typeset -A foo=(bar baz); print -- ${foo[(k)-R]} - ${+foo[(k)-R]}; typeset -A foo=(bar bar -R qux); print -- ${foo[(k)-R]} - ${+foo[(k)-R]}
>
> That change makes sense. Searching the wider code shows many cases where
> we've done similar tests with opt_args[(i)...|...|... but none with
> (k). Subscript flags can be easy to make mistakes with.
>
> Oliver
ping for further feedback and/or committing
--
vq
Messages sorted by:
Reverse Date,
Date,
Thread,
Author