|
From: | Chet Ramey |
Subject: | Re: unset does not remove functions like a[b] unless -f is specified |
Date: | Fri, 3 Feb 2023 16:21:32 -0500 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 |
On 2/3/23 1:17 AM, Koichi Murase wrote:
It would break all my scripts, which use slashes for the pseudo-namespacing, so I'm personally unhappy if the function names would be restricted at this time. As far as I try the oldest Bash version 1.14.7 available at < https://ftp.gnu.org/gnu/bash/ > (I haven't applied reverse patches of 1.14.*), it already supports a slash in function names outside the `-o posix' mode: $ bash-1.14 -c 'func/name() { echo a; }; func/name' a so the support for the function names has a history of mostly thirty years.
Bash has allowed slashes in function names since the beginning: 1988. I can see a case for posix mode disallowing execution of functions whose names contain a slash, but default mode has always allowed it. -- ``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] |