Changing default setting of bash's hash table?
Roman Rakus
rrakus at redhat.com
Fri Aug 19 11:24:37 UTC 2011
Maybe the subject is a bit misleading, I will clarify it.
Bash is using hash table to remember locations of executed commands.
Whenever you try to run a command bash looks in hash table. When the
command is found in table then bash will you full path name as it is in
the table.
However there is a problem when the command moved (or is deleted). Bash
by default is not checking if the command is really on the location. But
there is bash option that will force bash to check if the command really
exists. Man page says:
checkhash
If set, bash checks that a command found in the hash ta‐
ble exists before trying to execute it. If a hashed
command no longer exists, a normal path search is per‐
formed.
I have a question, if it is worth to enable this option by default? It
will not confuse some people, but can increase disk searching. Comments
welcome.
RR
More information about the devel
mailing list