[CLUE-Tech] Why can't bash find vi?

Jed S. Baer thag at frii.com
Fri Oct 12 15:50:51 MDT 2001


On Fri, 12 Oct 2001 15:31:18 -0600
"Timothy C. Klein" <teece at silverklein.net> wrote:

> Jed,
> So this xterm was open before you changed any of this stuf with vi?  And
> subsequent xterms work fine?  If that is the case, I would say that bash
> is remembering where vi used to be.   Bash hashes previous directory
> lookups in an internal data structure so that it does not have to look
> up the location of the exec every time.  Try typing:

$ type vi
vi is hashed (/bin/vi)

So, now that I know what I'm looking for: (from the manpage)

    checkhash
       If set, bash checks that a command found in
       the hash table exists before trying to exe­
       cute  it.   If  a  hashed command no longer
       exists, a normal path search is  performed.

fixed by entering shopt -s checkhash

I had this vague memory of bash doing something like this, but I couldn't
find it.
Thanks.

jed

-- 
"Some people spend an entire lifetime wondering if they've made a
 difference. Free Software developers don't have that problem."



More information about the clue-tech mailing list