Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] (?) typeset array[position=index]=value
On Wed, Jun 2, 2021 at 7:20 AM Stephane Chazelas <stephane@xxxxxxxxxxxx> wrote:
>
> $dryrun typeset hash[$key]=1 # here typeset not recognised as
> # keyword
Same for "builtin typeset ..." of course.
> let 'hash[$key] = 1' # yes, it works despite the single quotes
I'm surprised that solves the \`()[] problem. I suspect it's
accidental and has to do with a different meaning of [...] in math
context.
> Parsing rules are different because we are in different
> contexts. For unset hash[$key] or unset hash[(e)*] to treat
> those as associative array lvalue, and not globs, it would need
> to be a reserved word, like typeset above.
That's true regarding globs, but I've just had a hand-slaps-forehead
moment ... take 3 to follow in another thread.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author