Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Mar 2017 07:34:40 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc:        freebsd-doc@freebsd.org, freebsd-current@freebsd.org, freebsd-hackers@freebsd.org
Subject:   Re: MANPATH not handled correctly
Message-ID:  <20170311063440.jorxsa3hod2pjuxu@ivaldir.net>
In-Reply-To: <20170108192633.GA42537@troutmask.apl.washington.edu>
References:  <20170108192633.GA42537@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--6ih2mue2d5jdfik6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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):
>=20
>   MANPATH   The standard search path used by man(1) may be changed by
>             specifying a path in the MANPATH environment variable.  Inval=
id
>             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.
>=20
> 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:=
 =20
>=20
> % setenv | grep MANPATH
> MANPATH=3D:/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
>=20
> So, the above description of MANPATH is incorrect as :/home/kargl/man
> should have been appended to the default MANPATH.
>=20
> Interestingly, manpath(1) seems to described what actually happens
> (long lines wrapped):
>=20
> % 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
>=20
> The expected result according apropos(1) and whatis(1) for last command is
>=20
> % 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

--6ih2mue2d5jdfik6
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAljDmn0ACgkQY4mL3PG3
PlqIRRAA0GuAKYqCdns5aaXDnYaSlT8sy60sxQVka+MBMn5B22lxpXJwInSg/BqA
FZeKXOhiKato4L98FkZwI03mxBZy9ohG/eK3kaBDs3MpD2fLbXl6BSlOvsyOoid6
K1jv/1qGEu1y8H1tCg5Jd2dzr4Do8lhOChMhu16zMpse97aJvJJewv4kMghUnSuu
vzmrYH/JtECe2RCBbtbRsNVDlZ1BXDwtVTeEpi3ellGMyiKp4O1W3i6NAeVqv+Fe
AYvUUzX2cGU2dvYgm9JEYM4Hk78IBoCutADSb/2bwDqcXSQsZfER4+Z1H7W2f5sL
C0rQa1tHTdGMklzV9fgFwz+vuM5QK9XuolQk0sTismPRlTWSx5s2NBPnUT7iAk1Q
8HRkwR40JMT1fs71vV2pSIvDvcJhsclGxzHkYYz8MeciqSbrD8L6hyPq87YFkkgP
hQpdH/5VzHLqPqoJtyXusHD42jMX4wtP680PYIj1uEwP3jZBDnXCFVB6AYsDMfLf
0ofSueD2HK+3CciO0oLYhh6GxlH+/6CnZc9S4CjZnpECd+S1LJn9EAqFkQAqEq5U
81kK82jH1YFffpHeKJhZnVh3oj53YRni1dBfI9dAhLRI4/gXrRCcygB6OQjuCpaq
x8a3Bwj1Xqb/AcrLjfOSayjMfiQ7O0YMhXfyzygqwVeYHy7E31s=
=wBwk
-----END PGP SIGNATURE-----

--6ih2mue2d5jdfik6--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170311063440.jorxsa3hod2pjuxu>