I have a script called jsl in /usr/local/bin. Running which jsl finds it there.I want to temporarily use a different version, and when I echo $PATH I see that /usr/bin is earlier in the path. So I added a script called jsl in that folder and I've verified that it is executable and runs correctly when called with the full path.However, which jsl still finds the first version, and jsl still runs it.Why isn't my new jsl being found by which or executed by name?
Why isn't the first executable in my $PATH being used?
path
The shell might be caching the command's location.  E.g. zsh does this, and has the rehash command to clear the cache.