On 3/28/21 7:02 AM, Oğuz wrote:
As it should be. `[bar]' doesn't qualify as an assignment without an equals
sign, the shell thinks you're mixing two forms of associative array assignment
there.
In the new form, that a key is listed inside a compound assignment alone
implies that it was meant to be assigned a value. In my mind, `a=(foo 123 bar)'
translates to `a=([foo]=123 [bar]=)'. It makes sense.
That is the point that i am making, in typeset -A ary=([key]=) an explicit
empty string is the value, but in the case of typeset -A ary=([key]) it was
historically an error. So why should an key without a value now be acceptable?