> I'd much rather prefer the use of an invalid shell name (such as > f()=...) than a valid shell name (BASH_FUNCTION_foo=()...).
Using a BASH_ prefix has some advantages: * Anyone setting such a variable, might expect it could change the behaviour of bash. Any script allowing setting untrusted BASH_ variables to untrusted values should probably expect bad things to happen. * Anyone seeing such a variable (in env) might expect it to change the behaviour of bash. If I see foo(), in env I would probably not think "Of course, it will change bash behaviour." * It avoids name clashes: whateversh might want to use foo() for its own (different) purpose. Maybe both could be used, BASH_FUNCTION_foo()? Is there any portability issue with using '()' on some OSes? -- Gabriel