I love using the Terminal's man page viewer. You can right click on anything and open its corresponding man page. Or just run
open x-man-page://1/<man page>
However, I'm having trouble getting Terminal to prioritize the right man page over a pre-installed one. Specifically it's the man page for the newer version of
rsync installed by homebrew. Running
man rsync in a shell shows the correct rsync manpage, from
/usr/local/share/man/man1/rsync.1, but using Terminal's manpage viewer shows the man page for the old version of rsync from
A very temporary solution is to run Terminal like this:
$ MANPATH=/usr/local/share/man /System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
That starts Terminal with
MANPATH set and it then looks in the right spot to find the new rsync man page. But setting MANPATH overrides all the other smart ways of finding man paths.
Note that the issue only shows up when there's multiple man pages for the same command. Somehow
man rsync knows to prioritize the man page installed by Homebrew in
/usr/local/share/man but Terminal prioritizes
I tried editing
/private/etc/man.conf and to
/usr/local/share/man first, but it had no effect. Even commenting out all the
/usr/share/man references had no effect.
Any ideas how to get Terminal's
x-man-page:// to prioritize the right man page like just running
man does? Cheers!