Re: (OT) path_helper [was Re: Xterm not reading dotfiles]
Re: (OT) path_helper [was Re: Xterm not reading dotfiles]
- Subject: Re: (OT) path_helper [was Re: Xterm not reading dotfiles]
- From: "Andrew J. Hesford" <email@hidden>
- Date: Sun, 18 Nov 2007 17:45:01 -0600
On Nov 18, 2007, at 5:10 PM, Nathaniel Gray wrote:
Whoops, I added "safety quotes" around the glob after testing, but it
looks like that breaks things. This should work:
[[ "$NEWPATH" = @(${p}|${p}:*|*:${p}|*:${p}:*) ]] && continue
That works. As a side benefit, it also makes LaTeXiT work when I
restore the "$HOME/bin" path element in /etc/paths.d. Now I can have
my cake and eat it too! And thanks for submitting the bug.
The @ makes it do a disjunction over the patterns.
Isn't that what the "|" characters are for? Or does bash not treat
them as operators unless the @ precedes the pattern?
Ok, but this isn't FreeBSD or Gentoo, this is Mac OS X. (Is
path_helper standard on other systems?) We like things simpler 'round
here. As it is you have *two* config sets to worry about
(/etc/paths{,.d/*} and /etc/manpaths{,.d/*}) when you only need one.
Plus, if you use man.conf and add something to your path on-the-fly
then manpath Just Works, which seems very Mac.
This is a good point, but having path_helper maintain MANPATH instead
of using man.conf has one benefit: packages that install files in non-
standard locations have an easy time adding manual locations to the
path. MacTeX, for example, fools around with /etc/profile to set the
path to executables, but it doesn't set a path to manual pages. If it
wanted to, it would have to fool with man.conf. By using the
path_helper trees, it can add itself to the manual AND executable path
by simply creating a file. I think this mechanism is less likely to
stomp on certain configurations when automatically altering the
environment. It keeps every package maintaining only its own files.
--
Andrew J. Hesford <email@hidden>
Department of Electrical and Computer Engineering
University of Illinois at Urbana-Champaign
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden