From: Bart Schaefer <schaefer@brasslantern.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: proxy name for array
Date: Tue, 9 Jan 2024 18:29:02 -0800 [thread overview]
Message-ID: <CAH+w=7YLcXShDfXNztJ+D_Yh+_ziyptLp_LspR_T=ajSLxAz3g@mail.gmail.com> (raw)
In-Reply-To: <2546420c-deb1-4dd7-a0e8-7b9db463503c@eastlink.ca>
On Tue, Jan 9, 2024 at 4:54 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
>> proxy_assign="${proxy}[2]"
>> : ${(P)proxy_assign::=TWO}
Actually I just thought of a much more straightforward way to do this.
set -A "${proxy}[2]" TWO
I had always thought "set -A" would complain about needing an
identifier, there, but it doesn't, and the semantics of assigning an
array to an array element make this work.
next prev parent reply other threads:[~2024-01-10 2:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 18:59 Ray Andrews
2024-01-10 0:21 ` Bart Schaefer
2024-01-10 0:54 ` Ray Andrews
2024-01-10 2:29 ` Bart Schaefer [this message]
2024-01-10 2:58 ` Ray Andrews
2024-01-10 3:05 ` Bart Schaefer
2024-01-10 13:44 ` Ray Andrews
2024-01-10 20:26 ` Ray Andrews
2024-01-10 21:11 ` Bart Schaefer
2024-01-10 21:22 ` 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='CAH+w=7YLcXShDfXNztJ+D_Yh+_ziyptLp_LspR_T=ajSLxAz3g@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--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).