Re: function names which contain a 'dash' character
From:
Paul Jarc
Subject:
Re: function names which contain a 'dash' character
Date:
Fri, 09 May 2008 14:07:03 -0400
User-agent:
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)
Jan Schampera <jan.schampera@web.de> wrote:
> Stephane Chazelas wrote:
>> Note that bash didn't have to. POSIX allows a shell to accept
>> any character in a function name, but it says one shouldn't use
>> those in a POSIX script, which is different.
>
> I'm not a POSIX expert, and this is the SUS, but I read:
>
> | The format of a function definition command is as follows:
> | fname() compound-command[io-redirect ...]
> | The function is named fname; the application shall ensure that it is a
> | name (see the Base Definitions volume of IEEE Std 1003.1-2001, Section
> | 3.230, Name).
"The application" is the script, not the shell, so this is consistent
with Stephane's statement.
paul