bug-bash
[Top][All Lists]
Advanced

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

Re: function names which contain a 'dash' character


From: Jan Schampera
Subject: Re: function names which contain a 'dash' character
Date: Fri, 09 May 2008 20:00:03 +0200
User-agent: IceDove 1.5.0.14pre (X11/20080305)

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).

--> ("name" def)

| In the shell command language, a word consisting solely of
| underscores, digits, and alphabetics from the portable character set.
| The first character of a name is not a digit.

just my2ct,
Jan




reply via email to

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