[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug: illegal function name?
From: |
Andrey Butirsky |
Subject: |
bug: illegal function name? |
Date: |
Sun, 20 Jan 2019 17:44:55 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0 |
Hello,
seems like bash allows illegal function names, but refuses to unset them
then:
|$ function 1a () { :; }||
|
|$ declare -f 1a ||
||1a () ||
||{ ||
|| :||
||}||
|
|$ unset 1a ||
||bash: unset: `1a': not a valid identifier
$
GNU bash, version 4.3.48(1)-release (x86_64-slackware-linux-gnu)|
The first character of a name should not be a digit:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_235