Sujet : Re: Default PATH setting - reduce to something more sensible?
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shellDate : 23. Jan 2025, 14:54:38
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vmthmu$3bb88$1@news.xmission.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
ccr96l-eot.ln1@ID-313840.user.individual.net>,
Geoff Clare <
netnews@gclare.org.uk> wrote:
...
Yes. Perhaps I trimmed too much. The post I was replying to said
"$HOME/bin [..] is better than ~/bin, because tilde expansion is not,
AFAIK, included in POSIX" and $HOME is also, of course, expanded before
PATH is assigned. So there is no reason to prefer $HOME/bin over ~/bin
since (when used in an assignment) they are equivalent in POSIX.
1) I have no idea what your beef with Kaz is. It seems silly at best.
2) I know this isn't going to sit well with you, but there absolutely are
situations (in bash) where ~ doesn't work as a substitute for $HOME, when
setting the various "path" variables. I know that I had lines in .profile
and/or .bashrc like: PATH=~/bin:$PATH (and similar) that did not work (that
is, the value stored in the variable contained an explicit tilde rather
than the expanded value - and this, of course, doesn't work at runtime).
Replacing the tilde with $HOME fixes this.
Sorry I don't have details, but it is true nonetheless.
-- A 70 year old man who watches 6 hours of TV a day, plays a lot of golfand seems to always be in Florida is a retiree, not a president.