bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hash not restored after running command -p


From: Oğuz
Subject: Re: hash not restored after running command -p
Date: Mon, 1 Nov 2021 12:21:41 +0300

On Mon, Nov 1, 2021 at 10:58 AM Mike Jonkmans <bashbug@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'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]