I keep an ~/opt directory for local software installs. It's got an ~/opt/local/man directory in it, along with some man pages (for example, nedit.man and nc.man).
I'm trying to set my MANPATH to include /home/john/opt/local/man, but although the environment variable is getting set, man still won't find those man pages. That is, if I set my MANPATH like so:
Code:
export MANPATH=/home/john/opt/local/man:$MANPATH
I still can't just run "man nc" to get that man page (I've got to use the -l option and specify the full path to that man page).
Also confusing is this: why does the default .bash_profile use the shell syntax:
Code:
MANPATH=~/man${MANPATH:-:}
?
That ${MANPATH:-:} means (according to the bash man page) to put in $MANPATH, or else, if $MANPATH isn't set, to just put in a colon. (?) That looks like a bug to me...
Finally -- and this seems pretty weird -- if I do:
Code:
export MANPATH=/home/john/opt/local/man
then man can no longer find any of its pages. Even though, previously, $MANPATH was empty!
Can anyone explain this weirdness?
Thanks.