On 17 Nov, 2003, at 13:31, John Labovitz wrote:
On Nov 16, 2003, at 6:45 PM, Vic Norton wrote:

I'm sorry about the confusion, Morbus. My ".bash_profile" contains the line
MANPATH=/usr/share/man:/man:/usr/X11R6/man:~/man
The "set" command, with no parameters, reproduces this as
MANPATH=/usr/share/man:/man:/usr/X11R6/man:/Users/vic/man
Regardless, I cannot see manuals in either
/man or /usr/X11R6/man
and "manpath" still produces
/usr/share/man:/Users/vic/man


My conclusion, in bash the value of the variable MANPATH has no effect
whatsoever on "man". Maybe bash doesn't need "setenv", but, so far, it
can't tell "man" where to look either.

Apparently we're not supposed to set $MANPATH anymore. There's a "manpath" command that "man" calls to automatically figure out the paths (from "man manpath"):


Manpath is used by man(1) to determine the search path, so users normally
don't need to set the MANPATH environment variable directly.


If you *do* set $MANPATH, "manpath" just echoes that, without doing its searching.

There is an /etc/manpath.config file that lets you expand the default places that "manpath" searches. On closer looking, and doing several searches across my whole system looking for manpages, I found that I needed to add the following lines:

        OPTIONAL_MANPATH        /opt/local/share/man
        OPTIONAL_MANPATH        /usr/local/share/man

The /opt/local reference is because I use Darwinports, which (like fink) puts all its installed files into its own directory. (Note that I have actually changed /usr/bin/perl to point to /opt/bin/perl, which may mean that a lot of what I've written may not be true on your system. ;)

Oddly, manpath.config contains the following line:

OPTIONAL_MANPATH /usr/local/lib/perl5/5.6.1/man

That doesn't seem right for a system running Perl 5.8.x...

(The "manpath" command seems, in my opinion, to be a decent solution -- but unfortunately doesn't seem to let a user add in their own paths without modifying the /etc file. It would be nice to have a $MANPATH_MANPATH environment variable that would be appended to whatever magic "manpath" performed.

I'm not certain what the issue/confusion is here.


My .profile has:

        MANPATH=$MANPATH:~/man:/usr/local/man:/usr/local/share/man
        MANPATH=$MANPATH:/usr/share/man:/usr/X11R6/man
        export MANPATH

NOTE the "export"

Which works as it has always worked -- both in zsh (which I normally use, emulating ksh) and bash.
I did not even need to modify my .profile from Jaguar.


The Borne Shell is different from the C-shell in that environment variables remain local unless exported!

T.T.F.N.
William H. Magill
# Beige G3 - Rev A motherboard - 768 Meg
# Flat-panel iMac (2.1) 800MHz - Super Drive - 768 Meg
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg]- Tru64 5.1a
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]



Reply via email to