From: "Lawrence Velázquez" <larryv@zsh.org>
To: "Ray Andrews" <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: (j.|.)
Date: Tue, 31 Jan 2023 20:33:50 -0500 [thread overview]
Message-ID: <a7550940-9fd2-4d51-a9a4-cad350202526@app.fastmail.com> (raw)
In-Reply-To: <20b89b79-11bb-13fc-2867-6bbb9b979c00@eastlink.ca>
On Tue, Jan 31, 2023, at 7:21 PM, Ray Andrews wrote:
> On 2023-01-31 15:33, Lawrence Velázquez wrote:
>> Search for "x|y" in zshexpn(1).
> No completions.
I don't know you're talking about. Just run "man zshexpn" and
search for "x|y". (You might have to escape the "|". Alternately,
search for "Glob Operators" and find it by eye.)
>> Search for "Subscript Flags" in zshparam(1), then find the "I" flag.
> Ok, I have that one about understood. So many tricks attach to
> associative arrays!
The flag is not limited to associative arrays.
% foo=axaybxby
% print ${foo[(I)a?]}
3
% bar=(ax ay bx by)
% print ${bar[(I)a?]}
2
% typeset -A baz=(ax 1 ay 2 bx 3 by 4)
% print ${baz[(I)a?]}
ax ay
--
vq
next prev parent reply other threads:[~2023-02-01 1:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 16:38 (j.|.) Ray Andrews
2023-01-31 16:41 ` (j.|.) Roman Perepelitsa
2023-01-31 16:49 ` (j.|.) Ray Andrews
2023-01-31 17:50 ` (j.|.) Ray Andrews
2023-01-31 18:10 ` (j.|.) Roman Perepelitsa
2023-01-31 19:13 ` (j.|.) Ray Andrews
2023-01-31 20:19 ` (j.|.) Roman Perepelitsa
2023-01-31 21:50 ` (j.|.) Ray Andrews
2023-01-31 23:33 ` (j.|.) Lawrence Velázquez
2023-02-01 0:21 ` (j.|.) Ray Andrews
2023-02-01 1:33 ` Lawrence Velázquez [this message]
2023-02-01 1:59 ` (j.|.) Ray Andrews
2023-02-01 2:14 ` (j.|.) Ray Andrews
2023-02-01 22:47 ` (j.|.) Ray Andrews
2023-02-02 0:43 ` (j.|.) Lawrence Velázquez
2023-02-02 1:21 ` (j.|.) Ray Andrews
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=a7550940-9fd2-4d51-a9a4-cad350202526@app.fastmail.com \
--to=larryv@zsh.org \
--cc=rayandrews@eastlink.ca \
--cc=zsh-users@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).