diff options
Diffstat (limited to 'builtins/hash.def')
-rw-r--r-- | builtins/hash.def | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/builtins/hash.def b/builtins/hash.def index d311ac90..b2959521 100644 --- a/builtins/hash.def +++ b/builtins/hash.def @@ -125,7 +125,7 @@ hash_builtin (list) if (list == 0 && expunge_hash_table == 0) { if (print_hashed_commands (list_portably) == 0) - printf (_("%s: hash table empty\n"), this_command_name); + fprintf (stderr, _("%s: hash table empty\n"), this_command_name); return (EXECUTION_SUCCESS); } @@ -165,10 +165,13 @@ hash_builtin (list) } else if (absolute_program (w)) continue; - else if (delete && phash_remove (w)) + else if (delete) { - sh_notfound (w); - opt = EXECUTION_FAILURE; + if (phash_remove (w)) + { + sh_notfound (w); + opt = EXECUTION_FAILURE; + } } else if (add_hashed_command (w, 0)) opt = EXECUTION_FAILURE; |