Re: zsh style associative array assignment bug

2021-03-27 Thread Eric Cook
On 3/28/21 12:25 AM, Oğuz wrote: Why? I think it's better this way. -- Oğuz 1) For consistency sake with the shell the idea was borrowed from mostly. 2) Prior to this extension bash required specifying the key and value for AA assignments, so it seems weird to silently ignore that a value w

Re: zsh style associative array assignment bug

2021-03-27 Thread Oğuz
28 Mart 2021 Pazar tarihinde Eric Cook 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

zsh style associative array assignment bug

2021-03-27 Thread Eric Cook
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 erro