[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: zsh style associative array assignment bug
From: |
Eric Cook |
Subject: |
Re: zsh style associative array assignment bug |
Date: |
Sun, 28 Mar 2021 02:37:46 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
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 wasn't given
now.
2.5) I subjectively think passing an odd number of elements to declare is more
often
than not to be a mistake that the user would be interested in knowing about.
With the way it is now, you could save a few characters to do a seen array.
$ while read -r key; ... seen+=("$key") ...
but not really much else.
- zsh style associative array assignment bug, Eric Cook, 2021/03/27
- Re: zsh style associative array assignment bug, Oğuz, 2021/03/28
- Re: zsh style associative array assignment bug,
Eric Cook <=
- Re: zsh style associative array assignment bug, Oğuz, 2021/03/28
- Re: zsh style associative array assignment bug, Ilkka Virta, 2021/03/28
- Re: zsh style associative array assignment bug, Oğuz, 2021/03/28
- Re: zsh style associative array assignment bug, Eric Cook, 2021/03/28
- Re: zsh style associative array assignment bug, Oğuz, 2021/03/28
- Re: zsh style associative array assignment bug, Greg Wooledge, 2021/03/28
- Re: zsh style associative array assignment bug, Andreas Schwab, 2021/03/29
- Re: zsh style associative array assignment bug, Ilkka Virta, 2021/03/29
- Re: zsh style associative array assignment bug, Robert Elz, 2021/03/28
- Re: zsh style associative array assignment bug, L A Walsh, 2021/03/29