28 Mart 2021 Pazar tarihinde Eric Cook <l...@gmx.com> yazdı: > Hey, > > When doing an assignment with an uneven number of elements bash currently > silently treat the last element > as a key and assigns it an empty string. > > $ typeset -A ary=(this feature came from zsh); typeset -p ary > declare -A ary=([came]="from" [this]="feature" [zsh]="" ) > > In zsh this is an error, > % typeset -A ary=(this feature came from zsh); typeset -p ary > zsh: bad set of key/value pairs for associative array > > Could bash be adjusted to align with zsh in this case?
Why? I think it's better this way. -- Oğuz