Annotation of src/usr.bin/man/man.conf.5, Revision 1.10
1.10 ! jmc 1: .\" $OpenBSD: man.conf.5,v 1.9 2003/06/03 02:56:12 millert Exp $
1.2 deraadt 2: .\"
1.1 deraadt 3: .\" Copyright (c) 1989, 1991, 1993
4: .\" The Regents of the University of California. All rights reserved.
5: .\"
6: .\" Redistribution and use in source and binary forms, with or without
7: .\" modification, are permitted provided that the following conditions
8: .\" are met:
9: .\" 1. Redistributions of source code must retain the above copyright
10: .\" notice, this list of conditions and the following disclaimer.
11: .\" 2. Redistributions in binary form must reproduce the above copyright
12: .\" notice, this list of conditions and the following disclaimer in the
13: .\" documentation and/or other materials provided with the distribution.
1.9 millert 14: .\" 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 15: .\" may be used to endorse or promote products derived from this software
16: .\" without specific prior written permission.
17: .\"
18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28: .\" SUCH DAMAGE.
29: .\"
30: .\" @(#)man.conf.5 8.5 (Berkeley) 1/2/94
31: .\"
32: .Dd January 2, 1994
33: .Dt MAN.CONF 5
34: .Os
35: .Sh NAME
36: .Nm man.conf
37: .Nd configuration file for
38: .Xr man 1
39: .Sh DESCRIPTION
40: The
41: .Xr man 1 ,
42: .Xr apropos 1 ,
43: and
44: .Xr whatis 1
45: commands
46: search for manual pages or their database files as specified by the
47: .Nm man.conf
48: file.
49: Manual pages are normally expected to be preformatted (see
50: .Xr nroff 1 )
51: and named with a trailing ``.0''.
52: .Pp
53: The
54: .Nm man.conf
55: file contains two types of lines.
56: .Pp
57: The first type of line is a ``section'' line, which contains a
58: section name followed by one or more directory paths.
59: The directory paths may contain the normal shell globbing characters,
60: including curly braces (``{}''); to escape a shell globbing character,
61: precede it with a backslash (``\e'').
62: Lines in this format specify that manual pages for the section
63: may be found in the following directories.
64: .Pp
65: Directories named with a trailing slash character (``/'') are expected
66: to contain subdirectories of manual pages, (see the keyword ``_subdir''
67: below) instead of manual pages.
68: These subdirectories are searched instead of the directory.
69: .Pp
70: Before searching any directory for a manual page, the
71: .Xr man 1
72: command always searches the subdirectory with the same name
73: as the current machine type, if it exists.
74: No specification of these subdirectories is necessary in the
75: .Nm man.conf
76: file.
77: .Pp
78: Section names are unrestricted except for the reserved words specified
79: below; in general, you should avoid anything with a leading underscore
80: (``_'') to avoid future incompatibilities.
81: .Pp
82: The section named ``_default'' is the list of directories that will
83: be searched if no section is specified by the user.
84: .Pp
85: The second type of line is preceded with a ``keyword''.
86: The possible keywords and their meanings are as follows:
87: .Bl -tag -width "_version"
88: .It _build
89: Man file names, regardless of their format, are expected to end in
1.7 aaron 90: a ``.*'' pattern, i.e., a ``.'' followed by some suffix.
1.1 deraadt 91: The first field of a _build line lists a suffix which indicates
1.6 alex 92: files which need to be reformatted or manipulated in some way before
1.1 deraadt 93: being displayed to the user.
94: The suffix may contain the normal shell globbing characters (NOT
95: including curly braces (``{}'')).
96: The rest of the line must be a shell command line, the standard
97: output of which is the manual page in a format which may be directly
98: displayed to the user.
99: Any occurrences of the string ``%s'' in the shell command line will
100: be replaced by the name of the file which is being reformatted.
101: .It _subdir
102: The list (in search order) of subdirectories which will be searched in
103: any directory named with a trailing slash (``/'') character.
104: This list is also used when a path is specified to the
105: .Xr man 1
106: utility by the user, using the
107: .Ev MANPATH
108: environment variable or the
109: .Fl M
110: and
111: .Fl m
112: options.
113: .It _suffix
1.3 aaron 114: Man file names, regardless of their format, are expected to end in
1.1 deraadt 115: a ``.*'' pattern, i.e. a ``.'' followed by some suffix.
116: Each field of a _suffix line is a suffix which indicates
117: files which do not need to be reformatted or manipulated
118: in any way, but which may be directly displayed to the user.
119: Each suffix may contain the normal shell globbing characters (NOT
120: including curly braces (``{}'')).
121: .It _version
122: The version of the configuration file.
123: .It _whatdb
124: The full pathname (not just a directory path) for a database to be used
125: by the
126: .Xr apropos 1
127: and
128: .Xr whatis 1
129: commands.
130: .El
131: .Pp
132: Multiple specifications for all types of lines are cumulative and the
133: entries are used in the order listed in the file; multiple entries may
134: be listed per line, as well.
135: .Pp
136: Empty lines or lines whose first non-whitespace character is a hash
137: mark (``#'') are ignored.
1.10 ! jmc 138: .Sh FILES
! 139: .Bl -tag -width /etc/man.conf -compact
! 140: .It Pa /etc/man.conf
! 141: standard manual directory search path
! 142: .El
1.1 deraadt 143: .Sh EXAMPLES
144: Given the following
145: .Nm man.conf
146: file:
147: .Bd -literal -offset indent
148: _version BSD.2
149: _subdir cat[123]
150: _suffix .0
151: _build .[1-9] nroff -man %s
152: _build .tbl tbl %s | nroff -man
153: _default /usr/share/man/
154: sect3 /usr/share/man/{old/,}cat3
155: .Ed
156: .Pp
157: By default, the command
158: .Dq Li man mktemp
159: will search for
160: ``mktemp.<any_digit>'' and ``mktemp.tbl''
161: in the directories
1.5 aaron 162: .Dq Pa /usr/share/man/cat1 ,
163: .Dq Pa /usr/share/man/cat2 ,
1.1 deraadt 164: and
165: .Dq Pa /usr/share/man/cat3 .
166: If on a machine of type ``vax'', the subdirectory ``vax'' in each
167: directory would be searched as well, before the directory was
168: searched.
169: .Pp
170: If ``mktemp.tbl'' was found first, the command
1.8 jmc 171: .Dq Li tbl <manual page> \&| nroff -man
1.1 deraadt 172: would be run to build a man page for display to the user.
173: .Pp
174: The command
175: .Dq Li man sect3 mktemp
176: would search the directories
177: .Dq Pa /usr/share/man/old/cat3
178: and
179: .Dq Pa /usr/share/man/cat3 ,
180: in that order, for
1.3 aaron 181: the
182: .Xr mktemp 1
183: manual page.
1.1 deraadt 184: If a subdirectory with the same name as the current machine type
185: existed in any of them, it would be searched as well, before each
186: of them were searched.
187: .Sh SEE ALSO
188: .Xr apropos 1 ,
189: .Xr machine 1 ,
190: .Xr man 1 ,
191: .Xr whatis 1 ,
192: .Xr whereis 1 ,
193: .Xr fnmatch 3 ,
194: .Xr glob 3