From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Assigning an array to a nameref "placeholder"
Date: Tue, 27 Feb 2024 18:10:44 -0800 [thread overview]
Message-ID: <CAH+w=7ZhN0=WXdcDuNzEo5gVN6P9uDw1Gx5zB3tNYRPXuKEigQ@mail.gmail.com> (raw)
In-Reply-To: <20240227064807.xa77q6qjek77nekq@chazelas.org>
On Mon, Feb 26, 2024 at 10:48 PM Stephane Chazelas
<stephane@chazelas.org> wrote:
>
> 2024-02-26 14:18:03 -0800, Bart Schaefer:
> >
> > > nameref unsetref; unsetref+=(foo bar). This now produces a "removing nameref attribute" warning before performing the assignment.
> >
> > I would rather make this an error, but it's probably not difficult
> > either way. Comments?
>
> An error (or forbidding typeset -n ref=var without the =var part
> like in mksh) would make a lot more sense to me as well.
Forbidding "typeset -n ref" would make using the "for" loop variation
a bit weird, but I'm perfectly fine with an error on assigning
something nonsensical to a nameref.
next prev parent reply other threads:[~2024-02-28 2:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 22:18 Bart Schaefer
2024-02-27 2:51 ` Bart Schaefer
2024-02-27 4:56 ` [PATCH] Appending an array to a scalar Bart Schaefer
2024-02-27 6:48 ` Assigning an array to a nameref "placeholder" Stephane Chazelas
2024-02-28 2:10 ` Bart Schaefer [this message]
2024-02-28 5:28 ` Stephane Chazelas
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=7ZhN0=WXdcDuNzEo5gVN6P9uDw1Gx5zB3tNYRPXuKEigQ@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--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).