|
| From: | Chet Ramey |
| Subject: | Re: Changing the way bash expands associative array subscripts |
| Date: | Thu, 8 Apr 2021 15:12:32 -0400 |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 |
On 4/6/21 11:01 AM, Greg Wooledge wrote:
On Tue, Apr 06, 2021 at 11:28:13PM +0900, Koichi Murase wrote:2) we can distinguish the erasure of the element associated with key=@ `unset -v a[$key]' from the entire array erasure `unset -v a[@]'.As a counter-proposal, Chet could entirely remove the special meaning of unset 'a[@]' and introduce a new option to unset which would take its place. It appears -a is not yet used, so that would be a good pick.
No need, since a bare `unset a' already removes the array variable a.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
| [Prev in Thread] | Current Thread | [Next in Thread] |