[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: functions whose name begins with a '-' are treated inconsistently
From: |
Chet Ramey |
Subject: |
Re: functions whose name begins with a '-' are treated inconsistently |
Date: |
Wed, 20 Feb 2002 08:46:24 -0500 |
> Bash Version: 2.05a
> Patch Level: 0
> Release Status: release
>
> Description:
> functions whose names start with a '-' are not documented as
> being illegal, but are treated as such by the declare
> built-in. In contrast, the type built-in allows them.
Yes, the treatment is inconsistent. Strictly speaking, the man page
says they're illegal: the grammar specifies that a function name is
a `name', where a `name' is defined as a shell identifier
([a-zA-Z_][a-zA-Z0-9_]*). In posix mode you wouldn't have been able
to define the function at all.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)
Chet Ramey, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/