bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request: Empty associative-array keys


From: Chet Ramey
Subject: Re: Feature request: Empty associative-array keys
Date: Wed, 14 Apr 2021 16:54:16 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1

On 4/8/21 6:02 PM, Koichi Murase wrote:

No error message for `unset 'a[]''?

It's still a valid function name, and `unset' attempts to unset variables
first, then functions. POSIX leaves that unspecified; that is how bash
behaves. Bash doesn't print an error message if you try to unset a function
that doesn't exist, and this falls into that case.

I'll respond to the rest at a later time, but this was quick.

--
``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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]