Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14690 > unrolled thread

Re: Auto-update program cache feature

Started byBob Proulx <bob@proulx.com>
First post2018-10-06 14:23 -0600
Last post2018-10-06 14:23 -0600
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Auto-update program cache feature Bob Proulx <bob@proulx.com> - 2018-10-06 14:23 -0600

#14690 — Re: Auto-update program cache feature

FromBob Proulx <bob@proulx.com>
Date2018-10-06 14:23 -0600
SubjectRe: Auto-update program cache feature
Message-ID<mailman.1774.1538857434.1284.bug-bash@gnu.org>
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

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web