.\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %sccs.include.redist.roff% .\" .\" @(#)man.conf.5 8.5 (Berkeley) 01/02/94 .\" .Dd .Dt MAN.CONF 5 .Os .Sh NAME .Nm man.conf .Nd configuration file for .Xr man 1 .Sh DESCRIPTION The .Xr man 1 , .Xr apropos 1 , and .Xr whatis 1 commands search for manual pages or their database files as specified by the .Nm man.conf file. Manual pages are normally expected to be preformatted (see .Xr nroff 1 ) and named with a trailing ``.0''. .Pp The .Nm man.conf file contains two types of lines. .Pp The first type of line is a ``section'' line, which contains a section name followed by one or more directory paths. The directory paths may contain the normal shell globbing characters, including curly braces (``{}''); to escape a shell globbing character, precede it with a backslash (``\e''). Lines in this format specify that manual pages for the section may be found in the following directories. .Pp Directories named with a trailing slash character (``/'') are expected to contain subdirectories of manual pages, (see the keyword ``_subdir'' below) instead of manual pages. These subdirectories are searched instead of the directory. .Pp Before searching any directory for a manual page, the .Xr man 1 command always searches the subdirectory with the same name as the current machine type, if it exists. No specification of these subdirectories is necessary in the .Nm man.conf file. .Pp Section names are unrestricted except for the reserved words specified below; in general, you should avoid anything with a leading underscore (``_'') to avoid future incompatibilities. .Pp The section named ``_default'' is the list of directories that will be searched if no section is specified by the user. .Pp The second type of line is preceded with a ``keyword''. The possible keywords and their meanings are as follows: .Pp .Bl -tag -width "_version" .It _build Man file names, regardless of their format, are expected to end in a ``.*'' pattern, i.e. a ``.'' followed by some suffix. The first field of a _build line lists a suffix which indicates files which need to be reformated or manipulated in some way before being displayed to the user. The suffix may contain the normal shell globbing characters (NOT including curly braces (``{}'')). The rest of the line must be a shell command line, the standard output of which is the manual page in a format which may be directly displayed to the user. Any occurrences of the string ``%s'' in the shell command line will be replaced by the name of the file which is being reformatted. .It _subdir The list (in search order) of subdirectories which will be searched in any directory named with a trailing slash (``/'') character. This list is also used when a path is specified to the .Xr man 1 utility by the user, using the .Ev MANPATH environment variable or the .Fl M and .Fl m options. .It _suffix Man file names, regardless of their format are expected to end in a ``.*'' pattern, i.e. a ``.'' followed by some suffix. Each field of a _suffix line is a suffix which indicates files which do not need to be reformatted or manipulated in any way, but which may be directly displayed to the user. Each suffix may contain the normal shell globbing characters (NOT including curly braces (``{}'')). .It _version The version of the configuration file. .It _whatdb The full pathname (not just a directory path) for a database to be used by the .Xr apropos 1 and .Xr whatis 1 commands. .El .Pp Multiple specifications for all types of lines are cumulative and the entries are used in the order listed in the file; multiple entries may be listed per line, as well. .Pp Empty lines or lines whose first non-whitespace character is a hash mark (``#'') are ignored. .Sh EXAMPLES Given the following .Nm man.conf file: .Bd -literal -offset indent _version BSD.2 _subdir cat[123] _suffix .0 _build .[1-9] nroff -man %s _build .tbl tbl %s | nroff -man _default /usr/share/man/ sect3 /usr/share/man/{old/,}cat3 .Ed .Pp By default, the command .Dq Li man mktemp will search for ``mktemp.'' and ``mktemp.tbl'' in the directories .Dq Pa /usr/share/man/cat1 , .Dq Pa /usr/share/man/cat2 , and .Dq Pa /usr/share/man/cat3 . If on a machine of type ``vax'', the subdirectory ``vax'' in each directory would be searched as well, before the directory was searched. .Pp If ``mktemp.tbl'' was found first, the command .Dq Li tbl | nroff -man would be run to build a man page for display to the user. .Pp The command .Dq Li man sect3 mktemp would search the directories .Dq Pa /usr/share/man/old/cat3 and .Dq Pa /usr/share/man/cat3 , in that order, for the mktemp manual page. If a subdirectory with the same name as the current machine type existed in any of them, it would be searched as well, before each of them were searched. .Sh FILES .Bl -tag -width /etc/man.conf -compact .It Pa /etc/man.conf Standard manual directory search path. .El .Sh SEE ALSO .Xr apropos 1 , .Xr machine 1 , .Xr man 1 , .Xr whatis 1 , .Xr whereis 1 , .Xr fnmatch 3 , .Xr glob 3