On Mon, Nov 5, 2018 at 10:38 PM Eduardo Bustamante <[email protected]>
wrote:
> Sorry, I'm having a hard time following this email thread.
I *think* the point is that OP expected that:
(a) ${!var[@]-foo} expands to the indexes of var if ${var[@]} if set, else
to `foo'
whereas the behavior they observed is:
(b) ${!var[@]-foo} expands to the value of the variable whose name is
stored
in ${var[@]} or to `foo' if that variable is unset
Their expectation seems reasonable since "the variable whose name is stored
in ${var[@]}" is kind of a weird thing.