Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Make zsh a tiny bit cleverer?



On Apr 28,  5:38pm, jarausch@xxxxxxxxxxxxxxxxxxx wrote:
} Subject: Re: Make zsh a tiny bit cleverer?
}
} On 28 Apr, Bart Schaefer wrote:
} > On Apr 28,  3:44pm, jarausch@xxxxxxxxxxxxxxxxxxx wrote:
} > } Subject: Make zsh a tiny bit cleverer?
} > }
} > } ABC
} > } 
} > } zsh doesn't find it (that's OK, it's not yet hashed) and
} > } suggests
} > } correct 'ABCD' to 'ABC'
} > } 
} > } If I say 'no' it finds and executes 'ABCD' but doesn't
} > } remember that there is an 'ABCD', indeed.
} > 
} > This should have been fixed last October, at least in the 3.1.x series.
} 
} What am I missing

You're not, I am.

The patches I mentioned are for a similar problem where there is a non-
executable `ABCD' earlier in the search path than an executable `ABCD',
which was causing the intended `ABCD' never to be found.  The symptom
was the same (zsh would offer to correct `ABCD').

So the real answer is that you need to turn off the HASH_DIRS option.
When HASH_DIRS is on, zsh doesn't re-search for new commands until after
it has already forked, so it can't remember it.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author