Liste des Groupes | Revenir à cu shell |
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:On 24.01.2025 14:46, Dan Cross wrote:[...]
/usr/bin/which is limited in what it can do. It follows POSIX-specified
behavior for $PATH; it doesn't recognize any shell-specific rules. [...]
[...]The settings PATH=~/bin and PATH="~/bin" respectively shall
result in the same behavior across shells when searching for
programs; in the first case looking into "/home/someuser/bin/"
and in the second case looking into "./~/bin/" (i.e. a path
component with a local directory named "~").
What do you mean by "shall result?
All shells that conform to POSIX behave as you describe. bash doesn't
conform to POSIX unless you ask it to. Neither do csh, tcsh, and fish.
[...]
BTW, it hadn't occurred to me that you can have a relative path in a
component of $PATH, but it does seem to work. I won't be taking
advantage of this information.
Les messages affichés proviennent d'usenet.