xref: /original-bsd/usr.bin/man/man.conf.5 (revision 3705696b)
1.\" Copyright (c) 1989, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"	@(#)man.conf.5	8.1 (Berkeley) 06/09/93
7.\"
8.Dd
9.Dt MAN.CONF 5
10.Os
11.Sh NAME
12.Nm man.conf
13.Nd configuration file for
14.Xr man 1
15.Sh DESCRIPTION
16The
17.Xr man 1 ,
18.Xr apropos 1 ,
19and
20.Xr whatis 1
21commands
22search for manual pages or their database files as specified by the
23.Nm man.conf
24file.
25Manual pages are expected to be preformatted (see
26.Xr nroff 1 )
27and named with a trailing ``.0''.
28.Pp
29The
30.Nm man.conf
31file contains two types of lines.
32.Pp
33The first type of line is a ``section'' line, which contains a
34section name followed by a directory path.
35Lines in this format specify that manual pages for the section
36may be found in the directory.
37.Pp
38Directories named with a trailing slash character (``/'') are expected
39to contain subdirectories (see the keyword ``_subdir'' below) instead
40of manual pages.
41These subdirectories are searched instead of the directory.
42.Pp
43All directories (either explicitly specified or named with a trailing
44slash) may contain subdirectories.
45The
46.Xr man 1
47command
48automatically searches any subdirectory with the same name as the
49current machine type before the directory is searched.
50No specification of these subdirectories is necessary in the
51.Nm man.conf
52file.
53.Pp
54Section names are unrestricted except for the reserved words specified
55below; in general, however, it is best to avoid anything beginning with
56an underscore (``_'') in order to avoid future incompatibilities.
57.Pp
58The section named ``_default'' is the list of directories to be
59searched if no section is specified.
60.Pp
61The second type of line is preceded with a ``keyword''.
62The possible keywords and their meanings are as follows:
63.Pp
64.Bl -tag -width "_version"
65.It _subdir
66The list (in search order) of subdirectories which will be searched in
67any directory named with a trailing slash (``/'') character.  This
68list is also used when a path is specified by the
69.Ev MANPATH
70environment
71variable or the
72.Fl M
73option.
74.It _version
75The version of the configuration file.
76.It _whatdb
77The full pathname (not just a directory path) for a database to be used
78by the
79.Xr apropos 1
80and
81.Xr whatis 1
82commands.
83.El
84.Pp
85Multiple specifications for all types of lines (except for ``_version'')
86are cumulative and the entries are used in the order listed in the file;
87multiple entries may be listed per line, as well.
88.Pp
89Empty lines or lines whose first non-whitespace character is a hash
90mark (``#'') are ignored.
91.Sh EXAMPLES
92Given the following
93.Nm man.conf
94file:
95.Bd -literal -offset indent
96_version	BSD.1
97_subdir		cat1 cat2 cat3
98_default	/usr/share/man/
99sect3		/usr/share/man/cat3
100.Ed
101.Pp
102The default
103.Xr mktemp 3
104manual page should be stored in
105.Dq Pa /usr/share/man/cat3/mktemp.0 .
106Any
107.Tn VAX
108architecture specific version of it should be stored in
109.Dq Pa cat3/vax/mktemp.0 .
110.Pp
111The command
112.Dq Li man mktemp
113would search the subdirectories
114.Dq Pa cat1
115.Dq Pa cat2 ,
116and
117.Dq Pa cat3 ,
118in
119.Dq Pa /usr/share/man ,
120in that order, for
121.Dq Pa mktemp.0''.
122If a subdirectory with the same name as the current machine type
123existed in any of them, it would be searched as well.
124.Pp
125The command
126.Dq Li man sect3 mktemp
127would only search
128.Dq Li /usr/share/man/cat3
129and any possible per machine subdirectory.
130.Sh FILES
131.Bl -tag -width /etc/man.conf -compact
132.It Pa /etc/man.conf
133Standard manual directory search path.
134.El
135.Sh SEE ALSO
136.Xr apropos 1 ,
137.Xr machine 1 ,
138.Xr man 1 ,
139.Xr whatis 1 ,
140.Xr whereis 1
141