*** ../bash-4.3-patched/builtins/set.def 2013-04-19 07:20:34.000000000 -0400 --- builtins/set.def 2015-05-05 13:25:36.000000000 -0400 *************** *** 752,758 **** --- 797,805 ---- { int unset_function, unset_variable, unset_array, opt, nameref, any_failed; + int global_unset_func, global_unset_var; char *name; unset_function = unset_variable = unset_array = nameref = any_failed = 0; + global_unset_func = global_unset_var = 0; reset_internal_getopt (); *************** *** 762,769 **** { case 'f': ! unset_function = 1; break; case 'v': ! unset_variable = 1; break; case 'n': --- 809,816 ---- { case 'f': ! global_unset_func = 1; break; case 'v': ! global_unset_var = 1; break; case 'n': *************** *** 778,782 **** list = loptend; ! if (unset_function && unset_variable) { builtin_error (_("cannot simultaneously unset a function and a variable")); --- 825,829 ---- list = loptend; ! if (global_unset_func && global_unset_var) { builtin_error (_("cannot simultaneously unset a function and a variable")); *************** *** 796,799 **** --- 843,849 ---- name = list->word->word; + unset_function = global_unset_func; + unset_variable = global_unset_var; + #if defined (ARRAY_VARS) unset_array = 0;