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