[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto-update program cache feature

From: Bob Proulx
Subject: Re: Auto-update program cache feature
Date: Sat, 6 Oct 2018 14:23:45 -0600
User-agent: Mutt/1.10.1 (2018-07-13)

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:

                      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

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.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]