Sujet : Re: Default PATH setting - reduce to something more sensible?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.unix.shellDate : 03. Feb 2025, 19:12:04
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250203100558.542@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-02-03, Keith Thompson <Keith.S.Thompson+
u@gmail.com> wrote:
Another interesting tidbit: the GNU `which` command has a "--skip-tilde"
option that tells it to skip elements of $PATH that start with '~'
(and also directories anywhere under $HOME).
>
From the output of `which --help`:
>
--skip-tilde Skip directories in PATH that start with a tilde.
Le's get this straight. The programmer who wrote this (we need not
repeat his name again, since it came up here about twice recently)
noticed that he had unexpanded tildes leaking into his PATH environment
variable, visible to child processes of his shell. Yet, instead of
realizing how wong that is and possibly reporting a bug against Bash,
he just ... hacked a feature into his pet utility to ignore them.
Everything to do with this utility is just whichcraft as far as I'm
concerned. (Okay, that is worn threadbare now, I will stop).
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca