Subject: man ignores section if MANPATH set
To: None <>
From: Simon J. Gerraty <>
List: current-users
Date: 01/03/1994 18:08:29
I finally got around to watching what man(1) does when I say:

	man 5 crontab

that causes it to show crontab.1...

The answer is that the section specifier "5" is only used if neither
-M,-P are given _and_ MANPATH is _not_ set in the environment.  This
is almost certainly a bug, but I'm not sure how best to modify the
behaviour.  Normally $MANPATH should override /etc/man.conf, but a
section specifier should further narrow the search.  The way man
currently works is:

	if no section specified, 
		use _default.
	if we have path (-M or -P or $MANPATH), 
		use that,
		get path for section (_default or whatever given on
		command line)

A major re-arrangement seems necessary (perhaps just dump man(1) in
favour of Tom Christiansen's ?)