4 ms·
Ugh, I'm very sorry to have wasted your time! I mostly work on Linux, but I tried it out on OS X and got the same results as you. It looks to me like OS X will
by pjungwir 8y ago
Ugh, I'm very sorry to have wasted your time! I mostly work on Linux, but I tried it out on OS X and got the same results as you.
It looks to me like OS X will only search for sections named 1-9 (and maybe "n" too). The MANSECT variable doesn't override this behavior. (I guess it just changes the priority then?)
But you can have a custom suffix after a number. So if you have ~/man/man7/postgres.7pj (note just a 7 for the folder, but 7pj for the file extension), you can open that file by saying `man 7pj postgres`. This is how other programs with a lot of man pages work, e.g. `man 3perl open`. It's not as nice to type a 7 too, but it's the best I can find that works. So I guess on OS X you'd still set MANPATH but can leave MANSECT alone. (You could also probably usurp section 9 or something, and omit your initials entirely.)
Or maybe you could compile a better `man` and put it in ~/bin. :-/
. . . In fact, I find that if I have ~/man/man7/postgres.7pj, I can even type `man xpj postgres` to get my page. Maybe OS X man is just buggy?
- toyg 8y agoThanks, your help led me to a good solution: Apple man will accept section 0, even though OSX doesn't ship it - so I can squat there. By appending :0 to MANSECT I don't even need the section. This could be the one time I actually find a good way to note down examples for later reuse. Thanks!