Sujet : Re: Default PATH setting - reduce to something more sensible?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.unix.shellDate : 26. Jan 2025, 02:39:59
Autres entêtes
Organisation : None to speak of
Message-ID : <87ikq2bbf4.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5
User-Agent : Gnus/5.13 (Gnus v5.13)
cross@spitfire.i.gajendra.net (Dan Cross) writes:
In article <vn2hsj$2pe96$1@dont-email.me>,
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
[snip]
>
Most of this discussion seems to be talking at cross-purposes.
I don't see much point in responding to the specifics.
>
My point was simply to show that shell behavior varies with
respect to how $PATH is treated; caveat emptor.
>
I don't usually use bash, but if you do and you really don't
like this behavior you can turn it off.
As far as I can tell, you can only turn off the behavior by
running in POSIX mode, which disables a lot of other Bash-specific
functionality. Personally, I'm unwilling to do that. I think I'd
like to see a "set -o" setting that disables just this feature.
You can *avoid* it by being careful not to put literal '~' characters
in $PATH (specifically at the beginning of any element of $PATH).
That's what I do (unintentionally before now, deliberately now that
I know about it.)
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */