2

The yellow man feature of the touch bar does not seem to use manpath, for example /opt/homebrew/share/man/ is ignored. How do you configure this?

2
  • Does man in Terminal find manpages from Homebrew?
    – nohillside
    Mar 24, 2021 at 10:50
  • It does work in terminal as expected.
    – Polluks
    Mar 24, 2021 at 10:59

1 Answer 1

2
+50

You need to add a MANPATH entry to /private/etc/man.conf as follows:

MANPATH /opt/homebrew/share/man

This will direct man to include the specified path directory in the search path (from man man):

If you don't specify an explicit path list with -M or [the] MANPATH [environment variable], man develops its own path list based on the contents of the configuration file /private/etc/man.conf. The MANPATH statements in the configuration file identify particular directories to include in the search path.

If have tested it in Big Sur and it works.

Why doesn't man honor the MANPATH environment variable in this case? When you look for a man page by pressing the "Open man Page for Selection" option in the Touch Bar, a process like the following is executed:

login -pfq <username> /usr/bin/man -P ul <command>

where:

  • username is your username
  • command is the command whose man page you want to display

login starts man directly, and it is not aware of the value of the MANPATH variable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .