Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: Initializations of named references with an empty string should trigger an error
- X-seq: zsh-workers 53679
- From: Lawrence Velázquez <larryv@xxxxxxx>
- To: "Philippe Altherr" <philippe.altherr@xxxxxxxxx>
- Cc: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>, "Mikael Magnusson" <mikachu@xxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: BUG: Initializations of named references with an empty string should trigger an error
- Date: Sun, 25 May 2025 17:57:52 -0400
- Archived-at: <https://zsh.org/workers/53679>
- Feedback-id: iaa214773:Fastmail
- In-reply-to: <CAGdYchsvD1sP2_UJeXJahTzgCycyiCmqBxV9COT_siGUD=suEg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAGdYcht34aJpA6JB-ssghkRtLqAMtZRDxNvi6sCRSWaf1HNrHg@mail.gmail.com> <CAH+w=7YTEFH5_xB8v2S8WwGxwGzt=drqfnnSERYnpKbU-opsrw@mail.gmail.com> <CAGdYchux0PiNnfnyYkjx5HEiaQBsrHRT0xMLd=Jp5rB0VtAQNQ@mail.gmail.com> <CAHYJk3T6n_Vj2jCJX9shB1a=9GdBx3hYyuadJ69iE5qE+8=vnQ@mail.gmail.com> <CAGdYchvWS4QZ367hJfqH_xz4EzCLPbMe8mH34eegiwND0ngSJw@mail.gmail.com> <CAH+w=7bxZfL+-bLv==zX1E269spUCmumpeCH2-ynAFsdwDzm=Q@mail.gmail.com> <CAHYJk3RpaT4au9L_e5QosQTw7tgCK6yC0BswiHu0J28GYhfMkg@mail.gmail.com> <CAH+w=7YmQSmZHUEnpU6zF3u=STn90mRMn9=M5AOuFNVjTtqpAg@mail.gmail.com> <CAGdYchukZFvaVWPvBLNd8boiueFF_6c+=+jW4KghgD-i9aKmYw@mail.gmail.com> <CAGdYchtMcAMgce5ASH6zCZUoDcmtTdsJu6NiLspv4LEBZfrd0g@mail.gmail.com> <CAGdYchsvD1sP2_UJeXJahTzgCycyiCmqBxV9COT_siGUD=suEg@mail.gmail.com>
On Sun, May 25, 2025, at 5:52 PM, Philippe Altherr wrote:
> We could add a new "typeset" option -R (reset) that would implicitly
> unset the variable before executing the "typeset".
>
> Even when TYPESET_TO_UNSET is disabled, -R is also somewhat useful for
> other variables than named references. For example, "typeset -R
> -$var_type $var_name" is more general than "typeset -$var_type
> $var_name=". The latter doesn't work for arrays.
typeset already uses -R for something else.
--
vq
Messages sorted by:
Reverse Date,
Date,
Thread,
Author