On Nov 4, 2007 7:11 PM, Mike Gerdts <[EMAIL PROTECTED]> wrote:
> Everyone seems to have their favorite order for PATH. People seldom
> seem to remember to make the corresponding changes to MANPATH.
[snip]
> This would have the effect of making the default path searched by man
> to simply follow the directory order specified by PATH. There may be
> a desire to remove duplicates, but I am not sure how important that
> really is (would make -k and -l cleaner).
>
> This would change the behavior documented in the man page.
Based up feedback I received over the past few weeks, I have written
the code to do the following:
- If MANPATH is set, it is used (no change in behavior)
- If MANPATH is not set, construct a MANPATH based upon PATH using the
following rules:
- For each PATH element, add <element>/../share/man to manpath
- If ../share/man does not exist, try ../man
- All manpath elements are passed through realpath()
- Duplicates are eliminated
- The default manpath (MANDIR == /usr/share/man) is appended if it
was not already part of the list.
The code has had a bit of testing to confirm that man, catman,
apropos, and whatis work as intended in my typical use cases.
Please take a look at the webrev and offer your feedback.
http://cr.opensolaris.org/~mgerdts/manpath-from-path/
--
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code