Re: zsh style associative array assignment bug

2021-03-28 Thread Greg Wooledge
On Sun, Mar 28, 2021 at 10:01:14PM +0300, Oğuz wrote: > On Sun, Mar 28, 2021 at 9:02 PM Eric Cook wrote: > > > in typeset -A ary=([key]=) an explicit empty string is the value > > No. An "explicit" empty string would be '', "", or something like that. > After `=' a value is expected but it's not

Re: zsh style associative array assignment bug

2021-03-28 Thread Robert Elz
Date:Sun, 28 Mar 2021 22:01:14 +0300 From:=?UTF-8?B?T8SfdXo=?= Message-ID: | No. An "explicit" empty string would be '', "", or something like that. No, not in sh it isn't - all quotes do is hide the effects of special characters (and prevent some uses, eg: as a

Re: zsh style associative array assignment bug

2021-03-28 Thread Oğuz
On Sun, Mar 28, 2021 at 9:02 PM Eric Cook wrote: > in typeset -A ary=([key]=) an explicit empty string is the value No. An "explicit" empty string would be '', "", or something like that. After `=' a value is expected but it's not there, so `[key]' is assigned the empty string. `typeset -A ary=

Re: zsh style associative array assignment bug

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

Re: zsh style associative array assignment bug

2021-03-28 Thread Oğuz
28 Mart 2021 Pazar tarihinde Ilkka Virta yazdı: > On Sun, Mar 28, 2021 at 10:16 AM Oğuz wrote: > >> That an idea was borrowed from another shell doesn't mean it should be >> implemented the same kludgy way. Besides, bash doesn't offer compatibility >> with zsh. >> > > You don't think the realm o

Re: zsh style associative array assignment bug

2021-03-28 Thread Ilkka Virta
On Sun, Mar 28, 2021 at 10:16 AM Oğuz wrote: > That an idea was borrowed from another shell doesn't mean it should be > implemented the same kludgy way. Besides, bash doesn't offer compatibility > with zsh. > You don't think the realm of POSIX-ish shells already has enough incompatibilities and

Re: zsh style associative array assignment bug

2021-03-28 Thread Oğuz
28 Mart 2021 Pazar tarihinde Eric Cook yazdı: > > 1) For consistency sake with the shell the idea was borrowed from mostly. That an idea was borrowed from another shell doesn't mean it should be implemented the same kludgy way. Besides, bash doesn't offer compatibility with zsh. > 2) Prior to