On Mon, Feb 3, 2025, at 2:57 PM, dale.wor...@comcast.net wrote: > Within that context, if an element of PATH contains a '~' character, you > don't expect that to cause execution requests to look in your home > directory, because '~' isn't the name of your home directory.
Yes, that was the whole point of Keith's original email. He was OBJECTING to the behavior and suggesting that it be deprecated but documented in the meantime. > For that matter, Bash doesn't search the path for executables It does. That's why this works: $ echo 'echo hi' >~/greet $ chmod +x ~/greet $ PATH='/opt/local/bin:~' $ ksh -c greet ksh: greet: not found $ bash -c greet hi > the > kernel uses the PATH of the process to find the file whose execution was > requested. Bash uses execve(2), which does not search PATH. -- vq