[Top][All Lists]

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

Document what's allowed in function names

From: Petteri Räty
Subject: Document what's allowed in function names
Date: Sat, 9 Apr 2011 15:42:45 +0300 (EEST)

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: i686-pc-linux-gnu-gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  
-DSYS_BASHRC='/etc/bash/bashrc' -DSYS_BASH_LOGOUT='/etc/bash/bash_logout' 
uname output: Linux pena 2.6.38-gentoo #1 SMP Wed Mar 23 00:19:18 EET 2011 i686 
Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GenuineIntel GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 4.2
Patch Level: 8
Release Status: release

        man bash is currently lacking information on what is allowed for 
        names. It implies name with name () compound-command [redirection] and
        at the start of the manual there is:

        name   A word consisting only of alphanumeric characters and 
        and beginning with an alphabetic character or an underscore.  Also 
        to as an identifier.

        In reality the rules for function names are much more loose. For example
        hyphen and forward slash are allowed. But there are still some 
        bash: `aa\'foo': not a valid identifier

        Not applicable.

        Please document the rules for function names to bash.1.

reply via email to

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