Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Remove support for named references to subscripted variables



> - The functions isident and valid_refname disagree on what are valid variable names.

This was actually intentional.  I'll try to dig up the reasons later.

Just to be clear, here is an example of what I mean: a variable named ".123" can't be created with an assignment or with a call to typeset but it works with a named reference initialized with ".123". Is that really expected?

$ .123=foo;
zsh: not an identifier: .123
$ typeset .123=foo;
typeset: not valid in this context: .123
$ typeset -n ref=.123; ref=foo; typeset -p .123; echo \${.123}=${.123}
typeset .123=foo
${.123}=foo

Philippe



On Wed, Feb 18, 2026 at 8:40 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
On Wed, Feb 18, 2026 at 11:37 AM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> - The functions isident and valid_refname disagree on what are valid variable names.

This was actually intentional.  I'll try to dig up the reasons later.


Messages sorted by: Reverse Date, Date, Thread, Author