diff options
author | Sebastian Schmidt <yath@yath.de> | 2012-04-17 11:23:35 +0200 |
---|---|---|
committer | Sebastian Schmidt <yath@yath.de> | 2012-04-17 11:24:20 +0200 |
commit | f4b417c62a4f272c4cf9a074d0f7a3a97201f9db (patch) | |
tree | e2196f3b6361e2377c43ab47a3abf17d8f6afd77 /builtins/hash.def | |
parent | 791237e44695d2ee123c8a6f665ef074f5fadfbb (diff) | |
download | external_bash-f4b417c62a4f272c4cf9a074d0f7a3a97201f9db.zip external_bash-f4b417c62a4f272c4cf9a074d0f7a3a97201f9db.tar.gz external_bash-f4b417c62a4f272c4cf9a074d0f7a3a97201f9db.tar.bz2 |
Update to upstream bash 4.2
This upgrades bash to from 4.1-rc to 4.2-release. See CWRU/changelog for
changes.
Change-Id: I926269c300cf44fa25964b5b375a148fcf11c4b7
Diffstat (limited to 'builtins/hash.def')
-rw-r--r-- | builtins/hash.def | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/builtins/hash.def b/builtins/hash.def index 7a8aced..6724ad1 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-2009 Free Software Foundation, Inc. +Copyright (C) 1987-2010 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -159,7 +159,9 @@ hash_builtin (list) { /* Add, remove or rehash the specified commands. */ w = list->word->word; - if (pathname) + if (absolute_program (w)) + continue; + else if (pathname) { if (is_directory (pathname)) { @@ -173,8 +175,6 @@ hash_builtin (list) else phash_insert (w, pathname, 0, 0); } - else if (absolute_program (w)) - continue; else if (delete) { if (phash_remove (w)) @@ -202,6 +202,7 @@ add_hashed_command (w, quiet) rv = 0; if (find_function (w) == 0 && find_shell_builtin (w) == 0) { + phash_remove (w); full_path = find_user_command (w); if (full_path && executable_file (full_path)) phash_insert (w, full_path, dot_found_in_search, 0); |