[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
error with `typeset -f some-func` in non-POSIX mode: bug or feature ?
From: |
Mike Frysinger |
Subject: |
error with `typeset -f some-func` in non-POSIX mode: bug or feature ? |
Date: |
Thu, 26 Jan 2006 19:51:36 -0500 |
User-agent: |
KMail/1.9 |
i know when you enable strict posix behavior, you cant use dashes in function
names ... but `typeset -f` seems to always reject the dash:
vapier@vapier 0 ~ $ some_func() { :; }
vapier@vapier 0 ~ $ some-func() { :; }
vapier@vapier 0 ~ $ bash --posix
bash-3.1$ some_func() { :; }
bash-3.1$ some-func() { :; }
bash: `some-func': not a valid identifier
bash-3.1$ exit
vapier@vapier 0 ~ $ type -t some_func
function
vapier@vapier 0 ~ $ type -t some-func
function
vapier@vapier 0 ~ $ typeset -f some_func
some_func ()
{
:
}
vapier@vapier 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
- error with `typeset -f some-func` in non-POSIX mode: bug or feature ?,
Mike Frysinger <=