xref: /freebsd/usr.bin/man/manpath.1 (revision 315ee00f)
1.\"-
2.\"  Copyright (c) 2010 Gordon Tetlow
3.\"  All rights reserved.
4.\"
5.\"  Redistribution and use in source and binary forms, with or without
6.\"  modification, are permitted provided that the following conditions
7.\"  are met:
8.\"  1. Redistributions of source code must retain the above copyright
9.\"     notice, this list of conditions and the following disclaimer.
10.\"  2. Redistributions in binary form must reproduce the above copyright
11.\"     notice, this list of conditions and the following disclaimer in the
12.\"     documentation and/or other materials provided with the distribution.
13.\"
14.\"  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\"  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\"  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\"  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\"  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\"  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\"  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\"  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\"  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\"  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\"  SUCH DAMAGE.
25.\"
26.Dd March 11, 2017
27.Dt MANPATH 1
28.Os
29.Sh NAME
30.Nm manpath
31.Nd display search path for manual pages
32.Sh SYNOPSIS
33.Nm
34.Op Fl Ldq
35.Sh DESCRIPTION
36The
37.Nm
38utility determines the user's manual search path from
39the user's
40.Ev PATH ,
41and local configuration files.
42This result is echoed to the standard output.
43.Bl -tag -width ".Fl d"
44.It Fl L
45Output manual locales list instead of the manual path.
46.It Fl d
47Print extra debugging information.
48.It Fl q
49Suppresses warning messages.
50.El
51.Sh IMPLEMENTATION NOTES
52The
53.Nm
54utility constructs the manual path from two sources:
55.Bl -enum -compact
56.It
57From each component of the user's
58.Ev PATH
59for the first of:
60.Bl -dash -compact
61.It
62.Pa pathname/man
63.It
64.Pa pathname/MAN
65.It
66If pathname ends with /bin:
67.Pa pathname/../share/man
68and
69.Pa pathname/../man
70.El
71.It
72The configuration files listed in the
73.Sx FILES
74section for
75.Va MANPATH
76entries.
77.El
78The information from these locations is then concatenated together.
79.Pp
80If the
81.Fl L
82flag is set, the
83.Nm
84utility will search the configuration files listed in the
85.Sx FILES
86section for
87.Va MANLOCALE
88entries.
89.Sh ENVIRONMENT
90The following environment variables affect the execution of
91.Nm :
92.Bl -tag -width ".Ev MANLOCALES"
93.It Ev MANLOCALES
94If set with the
95.Fl L
96flag, causes the utility to display a warning and the value, overriding any
97other configuration found on the system.
98.It Ev MANPATH
99If set, causes the utility to display a warning and the value, overriding
100any other configuration found on the system.
101.It Ev PATH
102Influences the manual path as described in the
103.Sx IMPLEMENTATION NOTES .
104.El
105.Sh FILES
106.Bl -tag -width indent -compact
107.It Pa /etc/man.conf
108System configuration file.
109.It Pa /usr/local/etc/man.d/*.conf
110Local configuration files.
111.El
112.Sh SEE ALSO
113.Xr apropos 1 ,
114.Xr man 1 ,
115.Xr whatis 1 ,
116.Xr man.conf 5
117