Jeffrey Walton wrote:
> I think a useful feature for Bash would be to automatically update the
> program cache after an install.
Put this in your ~/.bashrc file and I believe your use case will be
much happier.
shopt -s checkhash
In the bash manual:
checkhash
If set, bash checks that a command found in the hash
table exists before trying to execute it. If a hashed
command no longer exists, a normal path search is
performed.
I would prefer that to be a default. But it changed a behavior back
in the day when it was added and deviated from the previous csh
behavior. Therefore being an optional option makes sense. But I
don't see a downside to defaulting to it now. In any case I always
add it to my bashrc file. (Along with "shopt -s checkwinsize" too.)
Bob