aboutsummaryrefslogtreecommitdiffstats
path: root/builtins/hash.def
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2005-12-07 14:08:12 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:57 +0000
commit95732b497d12c98613bb3c5db16b61f377501a59 (patch)
tree5e1cdf79eb0407e09dca4c0ec29e11442c7d1d15 /builtins/hash.def
parenteb87367179effbe5f430236db8259006d71438b7 (diff)
downloadandroid_external_bash-95732b497d12c98613bb3c5db16b61f377501a59.tar.gz
android_external_bash-95732b497d12c98613bb3c5db16b61f377501a59.tar.bz2
android_external_bash-95732b497d12c98613bb3c5db16b61f377501a59.zip
Imported from ../bash-3.1.tar.gz.
Diffstat (limited to 'builtins/hash.def')
-rw-r--r--builtins/hash.def11
1 files changed, 7 insertions, 4 deletions
diff --git a/builtins/hash.def b/builtins/hash.def
index d311ac9..b295952 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;