i wrote, i write again
declare "var=value"
not
declare "var"="value"

On Sun, Aug 22, 2021, 00:02 Hunter Wittenborn <hun...@hunterwittenborn.com>
wrote:

> > As an end user I would expect the unquoted `('
>
> > operator to cause a syntax error, just as it does in `echo ('.
>
>
>
> Well I'm expecting '(' to be part of the shell's syntax (when unquoted; so
> likewise not cause a syntax error), but when looking at things like the
> left side of a variable assignment, I'm sure you'll agree that it should
> allow any string that fits a variable's normal specification (regardless of
> being an array or not).
>
>
>
> Maybe this will explain how I'm thinking about it:
>
>
>
> In my head, something like this (where 'value' is equal to 'y'):
>
>
>
> `declare "${value}"="x"`
>
>
>
> becomes this (which it appears to do so):
>
>
>
> `declare "y"="x"`
>
>
>
> Logically (for me anyway), this:
>
>
>
> `declare "${value}"=("x" "z")`
>
>
>
> should then become this:
>
>
>
> `declare "y"=("x" "z")`
>

Reply via email to