> 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 assignme
> > does not allow it.
> >
> > `declare' does allow compound array assignment statements as arguments, and
> > the parser accommodates this as long as two conditions hold: the parser can
> > detect that the first word of a simple command is `declare' and the
> > argument is a valid assignment statement. In this case, the second fails,
> > since `"${variable}"' is not a valid shell identifier. That renders the
> > argument not a valid assignment statement.
---
Hunter Wittenborn
https://www.hunterwittenborn.com
https://github.com/hwittenborn
mehow a
feature or not.
Lastly: A workaround for this was found here [1] which uses namerefs, and works
just fine (and is probably easier for me to look at anyway), but this seemed
like something that deemed a bug report regardless.
[1]: https://lists.gnu.org/archive/html/help-bash/2021-08/msg00069.html
---
Hunter Wittenborn
https://www.hunterwittenborn.com
https://github.com/hwittenborn