From: "Lawrence Velázquez" <larryv@zsh.org>
To: "Roman Perepelitsa" <roman.perepelitsa@gmail.com>,
"Marlon Richert" <marlon.richert@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: Expand each array element with ${(P)...}
Date: Tue, 06 Feb 2024 02:40:34 -0500 [thread overview]
Message-ID: <21b1c1f6-3592-4122-a667-f5b98ca3dfbc@app.fastmail.com> (raw)
In-Reply-To: <CAN=4vMrFE1aCmdjLAcCFp25r=2LPWF74K8=1kZPUEXgrNr8R8Q@mail.gmail.com>
On Tue, Feb 6, 2024, at 2:25 AM, Roman Perepelitsa wrote:
> I don't know if there is a better way.
I'm not sure there is. If you nest (P) to delay its application,
the shell explicitly complains about the very thing Marlon wants
to do:
% names=(a b c)
% : ${${(P)names}}
zsh: parameter name reference used with array
--
vq
prev parent reply other threads:[~2024-02-06 7:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 6:50 Marlon Richert
2024-02-06 7:25 ` Roman Perepelitsa
2024-02-06 7:40 ` Lawrence Velázquez [this message]
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=21b1c1f6-3592-4122-a667-f5b98ca3dfbc@app.fastmail.com \
--to=larryv@zsh.org \
--cc=marlon.richert@gmail.com \
--cc=roman.perepelitsa@gmail.com \
--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).