On 12/8/18 11:45 PM, Grisha Levit wrote:
> FWIW, namerefs in the temporary environment bypass the implemented checks:
>
> $ declare -n ref=var[0]
> $ ref=X printenv 'var[0]'
> X
Thanks for the report. We should follow namerefs, but in this case not
allow nameref values that aren't val
FWIW, namerefs in the temporary environment bypass the implemented checks:
$ declare -n ref=var[0]
$ ref=X printenv 'var[0]'
X
On Wed, Jul 18, 2018 at 11:01 AM Chet Ramey wrote:
> The question is what to do with them:
>
> 1. Reject them as invalid environment variable names.
>
> 2. Accept them as if they were valid assignment statements and create an
>array variable, rejecting the second assignment because it uses an
On 7/17/18 4:51 PM, Grisha Levit wrote:
> Usually, an assignment preceding a command that would create a
> variable with an invalid name is rejected and treated like a command
> name:
>
> $ 1=X :
> bash: 1=X: command not found
>
> But when the variable name looks (sort of) like an array subscript