From: "Lawrence Velázquez" <larryv@zsh.org>
To: zsh-workers@zsh.org
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 [thread overview]
Message-ID: <2b3b638c-a140-4307-80c1-14dbd4f256b2@www.fastmail.com> (raw)
In-Reply-To: <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
next prev parent reply other threads:[~2021-07-18 22:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 5:11 Eric Cook
2021-07-08 22:05 ` Oliver Kiddle
2021-07-18 22:46 ` Lawrence Velázquez [this message]
2021-07-19 6:18 ` Eric Cook
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=2b3b638c-a140-4307-80c1-14dbd4f256b2@www.fastmail.com \
--to=larryv@zsh.org \
--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).