3 ms·
Don't forget to add the following line to your .bash<whatever> to make the man pages of your custom software accessible: export MANPATH=/usr/local/share/ma
by pstadler 14y ago
Don't forget to add the following line to your .bash<whatever> to make the man pages of your custom software accessible:
export MANPATH=/usr/local/share/man:$MANPATH
This works for packages installed with homebrew and othe software that follows the standards.
- pooriaazimi 14y agoThanks! I didn't know there was such a thing as $MANPATH! But, I don't think it's necessary. I don't have `/usr/local/share/man` in my $MANPATH (I don't have a $MANPATH at all, as a matter of fact), yet `man sl` works (and by running `sudo opensnoop` in another shell process I verified that groff indeed pulled the data from `/usr/local/share/man/man1/sl.1`) (OS X 10.8.1)
- jasomill 14y agoYou are correct: $ man man . . . man uses a sophisticated method of finding manual page files, based on the invocation options and environment variables, the /pri- vate/etc/man.conf configuration file, and some built in conventions and heuristics. . . . $ fgrep local/share/man /private/etc/man.conf MANPATH /usr/local/share/man MANPATH_MAP /usr/local/bin /usr/local/share/man MANPATH_MAP /usr/local/sbin /usr/local/share/man $ (OS X 10.8.n, for some unannounced future value of n, but AFAIK this behavior is unchanged since 10.4 Tiger)
- pstadler 14y agoYou're right. Good to know that man checks this path by default. I'm using a custom path for homebrew, that's why I added /usr/local/homebrew/share/man to the $MANPATH.