Hmm... from the bash 'help unset' command:
unset: unset [-f] [-v] [name ...]
For each NAME, remove the corresponding variable or function. Given
the `-v', unset will only act on variables. Given the `-f' flag,
unset will only act on functions. With neither flag, unset first
tries to unset a variable, and if that fails, then tries to unset a
function.
Nothing here explicitly forbids unsetting a function from within the function, and it does work. Kind of like the tapes Mr. Phelps listened to at the beginning of each episode of Mission Impossible: "Good Morning, Mr. Phelps... This tape will self-destruct in 10 seconds...."
|