On Wed, 06 May 2015 17:23:20 +0200, Jan Stary wrote:
> This is the latest amd64 snapshot.
> Is seems that there is a subtle bug in man(1).
>
> If I augment my man path with -m ~/man,
> as I do with alias man='man -m ~/man',
> man(1) does not find the system manpages, saying
>
> man: No entry for ls in the manual.
>
> but it does find and display those in ~/man correctly.
> This happens if /etc/man.conf does not exist.
It also works if the MANPATH environment variable is set.
The problem appears to be this:
if (conf->manpath.sz == 0)
manpath_parseline(&conf->manpath, manpath_default, 0);
If -m is specified, conf->manpath.sz will be 1, not 0.
An ugly way to fix this is:
if (conf->manpath.sz == !!auxp)
manpath_parseline(&conf->manpath, manpath_default, 0);
- todd