[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug: illegal function name?
From: |
Andrey Butirsky |
Subject: |
Re: bug: illegal function name? |
Date: |
Mon, 21 Jan 2019 00:25:48 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0 |
On 21.01.2019 00:02, Chet Ramey wrote:
> On 1/20/19 1:46 PM, Andrey Butirsky wrote:
>> I'm not quite understand what exactly is "intentional".
>> The problem is inconsistent behavior of unset '-f' flag for "normal" and
>> "not-normal" function names (I'm not considering conflicting with
>> variable names case).
> You should not ignore the variable names case. The behavior of unset
> without arguments is to check for a variable first, then optionally
> check for a function name. The variable name check enforces the
> restrictions on valid characters that may appear in variable names. The
> only guaranteed way to make a POSIX shell unset a function name is to
> use `unset -f'.
>
> "If neither -f nor -v is specified, name refers to a variable; if a
> variable by that name does not exist, it is unspecified whether a function
> by that name, if any, shall be unset."
>
> Where is the inconsistent behavior for `unset -f'? It works whatever
> the name of the function is when in default mode, and obeys the POSIX
> restrictions when in posix mode.
>
I meant rather `unset` without '-f'.
But if what you quoted is from the standard, seems it allows
implementation-specific behavior in that case. Thanks.
- Re: bug: illegal function name?, (continued)
- Re: bug: illegal function name?, Ilkka Virta, 2019/01/20
- Re: bug: illegal function name?, Chet Ramey, 2019/01/20
- Re: bug: illegal function name?, Eduardo A . Bustamante López, 2019/01/20
- Re: bug: illegal function name?, Andrey Butirsky, 2019/01/20
- Re: bug: illegal function name?, Eduardo Bustamante, 2019/01/20
- Re: bug: illegal function name?, Andrey Butirsky, 2019/01/20
- Re: bug: illegal function name?, Eduardo Bustamante, 2019/01/20
- Re: bug: illegal function name?, Chet Ramey, 2019/01/20
- Re: bug: illegal function name?,
Andrey Butirsky <=
- Re: bug: illegal function name?, Robert Elz, 2019/01/20
- Re: bug: illegal function name?, Eduardo A . Bustamante López, 2019/01/20
- Re: bug: illegal function name?, pepa65, 2019/01/21
- Re: bug: illegal function name?, Chet Ramey, 2019/01/21
- Re: bug: illegal function name?, Robert Elz, 2019/01/20
- Re: bug: illegal function name?, Andrey Butirsky, 2019/01/21
- Re: bug: illegal function name?, Chet Ramey, 2019/01/20