Man pages are not necessarily located at the given hard coded paths. This patch queries the current locations by parsing the standard output given when running manpath. According to man man this is (sort of) the way man is doing it by default:
-M path, --manpath=path
Specify an alternate manpath to use. By default, man uses man‐
path derived code to determine the path to search. This option
overrides the $MANPATH environment variable and causes option -m
to be ignored.
Man pages are not necessarily located at the given hard coded paths. This patch queries the current locations by parsing the standard output given when running
manpath
. According toman man
this is (sort of) the wayman
is doing it by default: