Hello, Colin Watson wrote on Mon, May 05, 2025 at 11:50:10AM +0100: > On Fri, May 02, 2025 at 07:49:17PM -0500, G. Branden Robinson wrote:
>> In my shell startup files, I make sure to update $MANPATH any time I >> update $PATH. >> >> This is not a common piece of cargo that Unix newcomers acquire; >> historically, I suppose a lot of man(1) implementations didn't support >> $MANPATH, but man-db has for decades, and I see mandoc(1) does too. > FWIW, with man-db, it's usually best for most people not to set MANPATH at > all unless manual pages are somewhere that can't be straightforwardly > derived from PATH. man-db will normally work it out based on PATH, and that > way it's harder for them to get out of sync. Actually, mandoc(1) does not really recommend setting MANPATH either. I consider it the job of the maintainer of the mandoc package on each operating system to set MANPATH_DEFAULT to a value that is reasonable for the operating system, as documented in configure.local.example. If the system administrator of a particular machine really wants to go full tilt crazy and use a site-specific directory layout, the best way to deal with that in mandoc is putting "manpath" directives into /etc/man.conf(5). When users have to worry about setting MANPATH, i think somebody is doing something suboptimal somewhere, either the system administrator or even more likely the package manager of the oprating system. Less configuration = more happiness. Make it sane by default. For example, personally, i hardly ever use MANPATH for anything except for testing purposes during core mandoc development. In the extremely rare cases where i want to access custom manual page trees in non-standard locations, i use the -M command line option rather than MANPATH. So even a highly specialized developer who spends about half his time on manual page development barely needs MANPATH at all. The thought that ordinary users might feel compelled to use it is rather surprising. Yours, Ingo