From f4b417c62a4f272c4cf9a074d0f7a3a97201f9db Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Tue, 17 Apr 2012 11:23:35 +0200 Subject: 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 --- builtins/hash.def | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'builtins/hash.def') 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); -- cgit v1.1