On 1/20/19 1:46 PM, Andrey Butirsky wrote: > I'm not quite understand what exactly is "intentional". > The problem is inconsistent behavior of unset '-f' flag for "normal" and > "not-normal" function names (I'm not considering conflicting with > variable names case).
You should not ignore the variable names case. The behavior of unset without arguments is to check for a variable first, then optionally check for a function name. The variable name check enforces the restrictions on valid characters that may appear in variable names. The only guaranteed way to make a POSIX shell unset a function name is to use `unset -f'. "If neither -f nor -v is specified, name refers to a variable; if a variable by that name does not exist, it is unspecified whether a function by that name, if any, shall be unset." Where is the inconsistent behavior for `unset -f'? It works whatever the name of the function is when in default mode, and obeys the POSIX restrictions when in posix mode. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/