On Dec 17, 2007 6:22 PM, Edward Pilatowicz <edward.pilatowicz at sun.com> wrote: > i really like the suggested manpatch search mechanism. > it should make the management of manpath much easier. > > that said, currently i have some MANPATH entries (ie, > entries in my MANPATH environment variable) which aren't > associated with any PATH entries. so to switch to this > new mechanism i'd have to drop these entries. so what > i was wondering is would it be possible to have some > new man(1) cli option that would display the current > dynamic man search path in the format of a MANPATH variable? > this would allow me to do something like the following > in my profile: > > PATH="<my_desired_path> > unset MANPATH > MANPATH=`man --found-dynamic-manpath-search-directories` > MANPATH=$MANPATH:<my extra junk> > export MANPATH > > thoughts? > ed
Interesting idea. As others have stated, this would also be useful for debugging or understanding path to manpath translations. How does this usage look? $ PATH=/usr/gnu/bin:/usr/xpg4/bin:/usr/ucb man -p /usr/gnu/share/man:/usr/share/man,1:/usr/share/man,1b:/usr/share/man,<lots of sections> $ cd /usr/sbin $ man -p ./ping ./ping /usr/share/man,1m $ man -p /usr/sbin/ping /usr/gnu/bin/ls /usr/sbin/ping /usr/share/man,1m /usr/gnu/bin/ls /usr/gnu/share/man Note that the output would expose the internals of duplicate avoidance logic that I've added, which could be ugly. From a debugging perspective, it could be useful information. It would also give the ability to set up a functional (but ugly) MANPATH. -- Mike Gerdts http://mgerdts.blogspot.com/
