[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hash -d does not work
From: |
Glenn Morris |
Subject: |
hash -d does not work |
Date: |
Wed, 25 Aug 2004 18:57:02 +0100 |
Configuration Information:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/scratch/gmorris/software/share/locale'
-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib
-I/scratch/gmorris/software/include -g -O2
uname output: Linux xpc14.ast.cam.ac.uk 2.6.8-1.521 #1 Mon Aug 16 09:01:18 EDT
2004 i686 athlon i386 GNU/Linux
Machine Type: i686-pc-linux-gnu
Bash Version: 3.0
Patch Level: 0
Release Status: release
Description:
`hash -d NAME' does not remove NAME from the command hash table.
Repeat-By:
hash -r
type find
-> find is /usr/bin/find
hash find
type find
-> find is hashed (/usr/bin/find)
hash -d find
type find
-> find is hashed (/usr/bin/find)
Fix:
At present, after `hash_builtin' successfully removes an element, it
immediately adds it back again. Possible patch:
*** builtins/hash.def.ORIG 2004-08-25 18:47:10.621671284 +0100
--- builtins/hash.def 2004-08-25 18:48:24.576007703 +0100
***************
*** 165,174 ****
}
else if (absolute_program (w))
continue;
! else if (delete && phash_remove (w))
{
! sh_notfound (w);
! opt = EXECUTION_FAILURE;
}
else if (add_hashed_command (w, 0))
opt = EXECUTION_FAILURE;
--- 165,177 ----
}
else if (absolute_program (w))
continue;
! else if (delete)
{
! if (phash_remove (w))
! {
! sh_notfound (w);
! opt = EXECUTION_FAILURE;
! }
}
else if (add_hashed_command (w, 0))
opt = EXECUTION_FAILURE;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- hash -d does not work,
Glenn Morris <=