On 2021-08-31 11:19 AM, Steve Dondley wrote:
This sounds like a stale-hash situation. According to my understanding,
the shell will typically keep a cache of what path it found a given
command at when it checked for that command in $PATH, so it doesn't have
to re-do the filesystem accesses on every run of the command; this
mapping of known paths to commands is apparently referred to as a set of
hashes.

I'm not familiar with zsh, but in bash, you could try 'hash -d fzf' to
drop the cached known path for fzf (so that the next check will look it
up again from scratch), or even 'hash -r' to forget *all* the known
paths for everything.

The "hash" command does not appear to even be installed on my system, even with sudo, maybe because I'm using zsh. But I did a little googling around and found this tip:

PATH="$PATH"

This will reset the command cache in zsh. I don't think this is the official way to do it, though.

Reply via email to