The system will search the MANPATH for man pages whenever you use man, whatis, or apropos. This variable is just like the usual PATH in that it is a colon-separated list of paths. For example to set a MANPATH that includes /usr/share/man and /usr/sfw/share/man, and you use pkg-get to install software in /opt/csw, then you might use,
MANPATH=/opt/csw/share/man:/usr/sfw/share/man:/usr/share/man
Now you can can type man vim and get the manpage from /opt/csw/share/man/man1/vim.1.gz to dipslay. Of course if you were to try apropos vim you would get an error:
/opt/csw/share/man/windex: No such file or directory
Oops. Apropos needs a whatis index to be built. You will need to run catman to build the indexes. It will automatically use your MANPATH to do so.
catman -w
Now you can apropos and man to your heart's content.
No comments:
Post a Comment