summaryrefslogtreecommitdiff
path: root/builtins/hash.def
diff options
context:
space:
mode:
Diffstat (limited to 'builtins/hash.def')
-rw-r--r--builtins/hash.def8
1 files changed, 5 insertions, 3 deletions
diff --git a/builtins/hash.def b/builtins/hash.def
index b295952..697ffd0 100644
--- a/builtins/hash.def
+++ b/builtins/hash.def
@@ -1,7 +1,7 @@
This file is hash.def, from which is created hash.c.
It implements the builtin "hash" in Bash.
-Copyright (C) 1987-2003 Free Software Foundation, Inc.
+Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -59,6 +59,7 @@ $END
#include "common.h"
#include "bashgetopt.h"
+extern int posixly_correct;
extern int dot_found_in_search;
extern char *this_command_name;
@@ -124,8 +125,9 @@ hash_builtin (list)
we test expunge_hash_table. */
if (list == 0 && expunge_hash_table == 0)
{
- if (print_hashed_commands (list_portably) == 0)
- fprintf (stderr, _("%s: hash table empty\n"), this_command_name);
+ opt = print_hashed_commands (list_portably);
+ if (opt == 0 && posixly_correct == 0)
+ printf (_("%s: hash table empty\n"), this_command_name);
return (EXECUTION_SUCCESS);
}