[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Can't unset function with unusual names
From: |
AnMaster |
Subject: |
Can't unset function with unusual names |
Date: |
Tue, 16 Oct 2007 20:22:38 +0200 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20070803) |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: x86_64-pc-linux-gnu-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I. -I./include -I./lib -march=k8 -pipe -O2 -msse3
uname output: Linux tux 2.6.22-gentoo-r8 #1 Mon Oct 8 18:38:06 CEST 2007 x86_64
AMD Sempron(tm) Processor 3300+ AuthenticAMD GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 3.2
Patch Level: 17
Release Status: release
Description:
Some names may be valid function names but not valid variable names
(for example: foo-bar, -foo.bar, foo+bar).
It is possible to create a function named like that but it is
impossible to unset that variable after.
It should either be possible to unset these or it should be impossible
to name functions like that (the latter would break many existing scripts, at
least - isn't that unusual in a function name)
Repeat-By:
$ .foo-bar() { echo test; }
$ .foo-bar
test
$ unset .foo-bar
bash: unset: `.foo-bar': not a valid identifier
- Can't unset function with unusual names,
AnMaster <=
- Message not available