bug-bash
[Top][All Lists]
Advanced

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

Re: unset does not remove functions like a[b] unless -f is specified


From: Chet Ramey
Subject: Re: unset does not remove functions like a[b] unless -f is specified
Date: Sat, 4 Feb 2023 14:47:59 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 2/4/23 12:14 PM, Koichi Murase wrote:

Is Bash required to strictly follow the POSIX
standard even for non-POSIX shell scripts that use Bash extensions?

The standard doesn't have a provision for extensions there: shell functions
are only executed if the name does not contain a slash.

I thought the shell functions with their names containing a slash may
be considered extensions, for which the standard might be modified to
make it explicit that they don't have a provision.

The standard doesn't specifically speak to implementations allowing shell
functions with slashes in their names: they are permitted if the
implementation wants to. I assume you're referring to the command search
and execution rules.


Is it impossible that this is
explicitly marked as `unspecified' in the standard?

It's not marked as unspecified.

Sorry, it was my grammatical misuse of the present tense. I intended
the future tense: I wanted to ask ``Would it be impossible that the
standard would be revised to explicitly mark it `unspecified'?''

I would be interested in the outcome of a discussion like this on the
austin-group-l mailing list. I very much doubt this would happen, but
anything's possible.

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