On Sat, Oct 18, 2025 at 20:30:25 -0400, Zachary Santer wrote:
> $ array[1][2]=another
> bash: no match: array[1][2]=another
>
> Really don't know what to make of that last error message.
"No match" is what csh says when it tries to expand a glob but there
are no matching files. So, that makes me suspect the parser has seen
your code, concluded that it can't possibly be a variable assignment,
and tries to glob-expand it for some reason.
hobbit:/usr/local/src/bash/bash$ grep 'no match:' *.c
subst.c: report_error (_("no match: %s"), tlist->word->word);
else if (fail_glob_expansion != 0)
{
last_command_exit_value = EXECUTION_FAILURE;
report_error (_("no match: %s"), tlist->word->word);
exp_jump_to_top_level (DISCARD);
}
I lack familiarity with this part of the code, so I'm not sure why
this particular branch is taken. It definitely needs the nameref
to be present. Otherwise, you just get:
hobbit:/tmp$ x*y
bash: x*y: command not found
hobbit:/tmp$ x[1][2]=3
bash: x[1][2]=3: command not found