MANPATH not handled correctly
Baptiste Daroussin
bapt at FreeBSD.org
Sat Mar 11 06:34:41 UTC 2017
On Sun, Jan 08, 2017 at 11:26:33AM -0800, Steve Kargl wrote:
> MANPATH is not handled correctly. According to the documentation
> in apropos(1) and whatis(1):
>
> MANPATH The standard search path used by man(1) may be changed by
> specifying a path in the MANPATH environment variable. Invalid
> paths, or paths without manual databases, are ignored.
> Overridden by -M. If MANPATH begins with a colon, it is
> appended to the default list; if it ends with a colon, it is
> prepended to the default list; or if it contains two adjacent
> colons, the standard search path is inserted between the
> colons. If none of these conditions are met, it overrides the
> standard search path.
>
> I have a manpage named mkpic in $HOME/man/man1. I also have the FreeBSD
> installed manpages, e.g., /usr/share/man/man1/cat.1.gz. If I have
> 'setenv MANPATH :$HOME/man' in my .cshrc file, then the following occurs:
>
> % setenv | grep MANPATH
> MANPATH=:/home/kargl/man
> % apropos mkpic
> (Warning: MANPATH environment variable set)
> mkpic(1) - construct a contour image in MIFF image format
> % apropos cat
> (Warning: MANPATH environment variable set)
> matrix(3) - Array and matrix allocation for FFT library
>
> So, the above description of MANPATH is incorrect as :/home/kargl/man
> should have been appended to the default MANPATH.
>
> Interestingly, manpath(1) seems to described what actually happens
> (long lines wrapped):
>
> % unsetenv MANPATH
> % manpath
> /home/kargl/man:/usr/local/man:/usr/share/man:/usr/share/openssl/man:\
> /usr/local/lib/perl5/site_perl/man:/usr/local/lib/perl5/5.20/perl/man:\
> /usr/local/share/xpdf/man
> % setenv MANPATH :$HOME/sman
> % manpath
> (Warning: MANPATH environment variable set)
> :/home/kargl/man
>
> The expected result according apropos(1) and whatis(1) for last command is
>
> % manpath
> /home/kargl/man:/usr/local/man:/usr/share/man:/usr/share/openssl/man:\
> /usr/local/lib/perl5/site_perl/man:/usr/local/lib/perl5/5.20/perl/man:\
> /usr/local/share/xpdf/man:/home/kargl/man
Sorry it took time, but it is now fixed. the issue was we have kept our man(1)
when importing mandoc and I have not noticed that mandoc had that feature.
I implemented it in our man(1)
While here I removed the painful warning
Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-doc/attachments/20170311/8cd640d5/attachment.sig>
More information about the freebsd-doc
mailing list