MANPATH weirdness
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 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 Can anyone explain this weirdness? Thanks. |
Ok, well, for one thing, I now see from manpath(1) that the extra colon in my $MANPATH is significant, so there is method to the ${MANPATH:-:} madness.
|
Alright. If I set MANPATH in ~/.bash_profile like so
Code:
export MANPATH=/home/john/opt/local/man${MANPATH:-:} Code:
manpath: warning: $MANPATH set, appending /etc/manpath.config |
All times are GMT -5. The time now is 12:31 PM. |