On 04/01/2008, Smylers <smyl...@stripey.com> wrote:
> I just spotted this in the README.Debian that Debian supply with Bash:
>
>   bash does not check $PATH if hash fails
>
>   bash hashes the location of recently executed commands. When a command
>   is moved to a new location in the PATH, the command is still in the
>   PATH but the hash table still records the old location.
>
>   For performance reasons bash does not remove the command from the hash
>   and relook it up in PATH.
>
> "For performance reasons"?!?
>
> The only way I can parse that is as claiming it's better to complain 'No
> such file or directory' than it is to run the command that the user
> asked for (and is in the path) because the former is faster.  Really, do
> you expect me to buy that?  Is that actually going to be useful to
> anybody?
>
>   Use 'hash -r' manually or set a bash option: 'shopt -s checkhash'.
>
> Options make sense when different users genuinely have different
> preferences, not to make up for stupidities in your default behaviour.

Heh. I got bit by this hatefulness for the first time just yesterday.
Very confusing. Its nice to hear I'm not the only one who finds this
stupidity to be, er, stupid.

:-)

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Reply via email to