zigalenarcic / mangl

An enhanced man page viewer for linux and BSD systems based on OpenGL and mandoc libraries
Other
39 stars 7 forks source link

determining paths to manpages via `manpath` executable #13

Closed christian-burger closed 10 months ago

christian-burger commented 11 months ago

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.
zigalenarcic commented 10 months ago

Thank you! Sorry for the delayed merge.