Doing 'unset -f' on an unset function outputs an error message and causes an unsuccessful exit status. All other shells quietly ignore it. POSIX specifies for 'unset' that "Unsetting a variable or function that was not previously set shall not be considered an error [...]". http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_29_03 If I have figured this out correctly, then the attached patch causes 'unset -f nonexistent_function' to be quiet and return status 0 if POSIXBUILTINS is active, without changing the behaviour of 'unfunction' and 'unhash -f'. - Martijn