On Mon, Nov 1, 2021 at 10:58 AM Mike Jonkmans <bash...@jonkmans.nl> wrote: > This wording does not cover it wholly, in my opinion. > Because when the utility's hashed path is not in $PATH, > then the utility should not have been searched for at all. > It should not be found, even if it is remembered.
Is the rest of this paragraph your opinion too or did I miss where the standard/bash manual says anything to this effect? > > The way it works now, is that the hashed keys are made into aliases. > These hash-aliases circumvent PATH search. > It is not specified by POSIX and I think it is an unwanted trap. POSIX does not mandate that the directory portion of the pathname used for executing a command be found in the current value of `PATH' either. Perhaps this calls for an clarification request. > Implicitly this sets PATH. > So it should not mess with the outcome of later PATH searches. Again, nowhere it is said that `command -p' involves modifying `PATH'.