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: "Nathaniel Gray" <email@hidden>
- Date: Sun, 18 Nov 2007 21:39:31 -0800
On Nov 18, 2007 3:45 PM, Andrew J. Hesford <email@hidden> wrote:
>
> 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.
It's getting so I can submit apple bugs in my sleep...
> > 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?
Bingo. The '|' is just a separator, not an operator.
> > 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.
But this is exactly my point. If mactex used a normal foo/bin
foo/share/man layout in their sub-tree they wouldn't need to do
anything *but* add foo/bin to the path, whether by path_helper or
/etc/profile munging (ick). There should never be a need for a
package to mess with man.conf. Quoting from the man man page:
Thus, with the proper use of [man.conf], when you issue the command
man xyz, you get a manual page for the program that would run if you
issued the command xyz.
Cheers,
-n8
--
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden