i know when you enable strict posix behavior, you cant use dashes in function
names ... but `typeset -f` seems to always reject the dash:
[EMAIL PROTECTED] 0 ~ $ some_func() { :; }
[EMAIL PROTECTED] 0 ~ $ some-func() { :; }
[EMAIL PROTECTED] 0 ~ $ bash --posix
bash-3.1$ some_func() { :; }
bash-3.1$ some-func() { :; }
bash: `some-func': not a valid identifier
bash-3.1$ exit
[EMAIL PROTECTED] 0 ~ $ type -t some_func
function
[EMAIL PROTECTED] 0 ~ $ type -t some-func
function
[EMAIL PROTECTED] 0 ~ $ typeset -f some_func
some_func ()
{
:
}
[EMAIL PROTECTED] 0 ~ $ typeset -f some-func
bash: typeset: `some-func': not a valid identifier
in other words, everything ive shown here is expected behavior except for the
very last 'typeset -f some-func' line ... this is with bash-3.1_p5, but
tested bash-3.0_p16 and got the same behavior ...
-mike
_______________________________________________
Bug-bash mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-bash