Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14690
| From | Bob Proulx <bob@proulx.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Auto-update program cache feature |
| Date | 2018-10-06 14:23 -0600 |
| Message-ID | <mailman.1774.1538857434.1284.bug-bash@gnu.org> (permalink) |
| References | <CAH8yC8kgkFRBaq85Z-tf+4x+DNqEU1CD-iZMgzJ6nYge-N4Sgg@mail.gmail.com> |
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
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Auto-update program cache feature Bob Proulx <bob@proulx.com> - 2018-10-06 14:23 -0600
csiph-web