2022-06-19 21:51:06 +03:00
|
|
|
.\" $NetBSD: man.conf.5,v 1.30 2022/06/19 18:51:06 gutteridge Exp $
|
1998-01-09 11:03:16 +03:00
|
|
|
.\"
|
1993-12-21 05:59:25 +03:00
|
|
|
.\" Copyright (c) 1989, 1991, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
2003-08-07 15:13:06 +04:00
|
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
1993-12-21 05:59:25 +03:00
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1995-01-16 12:29:08 +03:00
|
|
|
.\" @(#)man.conf.5 8.5 (Berkeley) 1/2/94
|
1993-12-21 05:59:25 +03:00
|
|
|
.\"
|
2022-06-18 05:19:07 +03:00
|
|
|
.Dd June 18, 2022
|
1993-12-21 05:59:25 +03:00
|
|
|
.Dt MAN.CONF 5
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm man.conf
|
2006-04-10 18:02:57 +04:00
|
|
|
.Nd configuration file for manual pages
|
1993-12-21 05:59:25 +03:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
2006-04-10 18:02:57 +04:00
|
|
|
.Nm
|
2006-04-14 01:15:50 +04:00
|
|
|
file contains the default configuration used by
|
1993-12-21 05:59:25 +03:00
|
|
|
.Xr man 1 ,
|
|
|
|
.Xr apropos 1 ,
|
2006-04-10 18:02:57 +04:00
|
|
|
.Xr whatis 1 ,
|
|
|
|
.Xr catman 8 ,
|
2002-03-09 01:12:22 +03:00
|
|
|
and
|
2015-03-03 20:59:32 +03:00
|
|
|
.Xr makemandb 8
|
2022-06-18 05:19:07 +03:00
|
|
|
to find manual pages and information about manual pages (e.g., the
|
|
|
|
.Xr whatis 1
|
|
|
|
database).
|
1993-12-21 05:59:25 +03:00
|
|
|
.Pp
|
2006-04-10 18:02:57 +04:00
|
|
|
Manual pages are located by searching an ordered set of directories
|
|
|
|
called the
|
|
|
|
.Dq man path
|
|
|
|
for a file that matches the name of the requested page.
|
2006-04-14 01:15:50 +04:00
|
|
|
Each directory in the search path usually has a set of subdirectories
|
2006-04-10 18:02:57 +04:00
|
|
|
in it (though this is not required).
|
|
|
|
When subdirectories are used, there are normally two subdirectories
|
|
|
|
for each section of the manual.
|
|
|
|
One subdirectory contains formatted copies of that section's manual
|
2006-04-14 01:15:50 +04:00
|
|
|
pages that can be directly displayed to a terminal, while the other
|
|
|
|
section subdirectory contains unformatted copies of the pages (see
|
|
|
|
.Xr nroff 1
|
2006-04-10 18:02:57 +04:00
|
|
|
and
|
2006-04-10 20:20:46 +04:00
|
|
|
.Xr mdoc 7 ) .
|
2006-04-10 18:02:57 +04:00
|
|
|
Formatted manual pages are normally named with a trailing
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ql \&.0
|
2006-04-10 18:02:57 +04:00
|
|
|
suffix.
|
1993-12-21 05:59:25 +03:00
|
|
|
.Pp
|
2006-04-10 18:02:57 +04:00
|
|
|
The
|
1997-10-19 09:05:24 +04:00
|
|
|
.Nm
|
2006-04-14 01:15:50 +04:00
|
|
|
file contains comment and configuration lines.
|
|
|
|
Comment lines start with the
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ql #
|
2006-04-14 01:15:50 +04:00
|
|
|
character.
|
|
|
|
Blank lines are also treated as comment lines.
|
|
|
|
Configuration lines consist of a configuration keyword followed by a
|
2006-04-10 18:02:57 +04:00
|
|
|
configuration string.
|
|
|
|
There are two types of configuration keywords: control keywords and
|
|
|
|
section keywords.
|
|
|
|
Control keywords must start with the
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ql _
|
2006-04-10 18:02:57 +04:00
|
|
|
character.
|
|
|
|
The following control keywords are currently defined:
|
2022-06-18 16:41:12 +03:00
|
|
|
.Bl -tag -width Ic
|
|
|
|
.It Ic _build
|
2013-06-28 01:55:10 +04:00
|
|
|
Identifies the set of suffixes used for manual pages that must be
|
2006-04-14 01:15:50 +04:00
|
|
|
formatted for display and the command that should be used to format
|
|
|
|
them.
|
|
|
|
Manual file names, regardless of their format, are expected to end in a
|
2022-06-18 16:41:12 +03:00
|
|
|
.Dq \&.*
|
2002-09-30 14:32:16 +04:00
|
|
|
pattern, i.e. a
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ql \&.
|
2002-09-30 14:32:16 +04:00
|
|
|
followed by some suffix.
|
2022-06-18 16:41:12 +03:00
|
|
|
The first field of a
|
|
|
|
.Ic _build
|
|
|
|
line contains a man page suffix specification.
|
2006-04-14 01:15:50 +04:00
|
|
|
The suffix specification may contain the normal shell globbing characters
|
2022-06-18 16:41:12 +03:00
|
|
|
.Po
|
|
|
|
.Em not
|
|
|
|
including csh-style curly braces
|
|
|
|
.Pc .
|
|
|
|
The rest of the
|
|
|
|
.Ic _build
|
|
|
|
line is a shell command line whose standard
|
2006-04-14 01:15:50 +04:00
|
|
|
output is a formatted manual page that can be directly displayed to
|
2006-04-10 18:02:57 +04:00
|
|
|
the user.
|
2011-12-27 17:15:55 +04:00
|
|
|
There should be exactly one occurrence of the string
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ql %s
|
2011-12-27 17:15:55 +04:00
|
|
|
in the shell command line, and it will
|
2006-04-10 18:02:57 +04:00
|
|
|
be replaced by the name of the file which is being formatted.
|
2022-06-18 16:41:12 +03:00
|
|
|
.It Ic _crunch
|
2013-06-28 01:55:10 +04:00
|
|
|
Used by
|
2006-04-10 18:02:57 +04:00
|
|
|
.Xr catman 8
|
|
|
|
to determine how to crunch formatted pages
|
2022-06-18 05:19:07 +03:00
|
|
|
which originally were compressed man pages.
|
|
|
|
The first field lists a suffix which indicates what kind of compression was
|
|
|
|
used to compress the man page.
|
1999-04-04 20:27:28 +04:00
|
|
|
The rest of the line must be a shell command line, used to compress the
|
|
|
|
formatted pages.
|
2011-12-27 17:15:55 +04:00
|
|
|
There should be exactly one occurrence of the string
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ql %s
|
2011-12-27 17:15:55 +04:00
|
|
|
in the shell command line, and it will
|
|
|
|
be replaced by the name of the output file.
|
2022-06-18 16:41:12 +03:00
|
|
|
.It Ic _default
|
2013-06-28 01:55:10 +04:00
|
|
|
Contains the system-wide default man path used to search for man pages.
|
2022-06-18 16:41:12 +03:00
|
|
|
.It Ic _mandb
|
2015-04-07 13:17:21 +03:00
|
|
|
Defines the full pathname (not just a directory path) for a database to
|
2022-06-18 16:41:12 +03:00
|
|
|
be used by the
|
2015-04-07 13:17:21 +03:00
|
|
|
.Xr apropos 1
|
|
|
|
and
|
|
|
|
.Xr whatis 1
|
|
|
|
commands.
|
|
|
|
The pathname may contain the normal shell globbing characters,
|
2022-06-18 16:41:12 +03:00
|
|
|
including csh-style curly braces;
|
2015-04-07 13:17:21 +03:00
|
|
|
to escape a shell globbing character,
|
|
|
|
precede it with a backslash
|
2022-06-18 16:41:12 +03:00
|
|
|
.Pq Ql \e .
|
|
|
|
.It Ic _subdir
|
2013-06-28 01:55:10 +04:00
|
|
|
Contains the list (in search order) of section subdirectories which will
|
2006-04-10 18:02:57 +04:00
|
|
|
be searched in any man path directory named with a trailing slash
|
2022-06-18 16:41:12 +03:00
|
|
|
.Pq Ql /
|
2002-09-30 14:32:16 +04:00
|
|
|
character.
|
2006-04-10 18:02:57 +04:00
|
|
|
This list is also used, even if there is no trailing slash character,
|
|
|
|
when a path is specified to the
|
1993-12-21 05:59:25 +03:00
|
|
|
.Xr man 1
|
2006-04-14 01:15:50 +04:00
|
|
|
utility by the user, by the
|
1993-12-21 05:59:25 +03:00
|
|
|
.Ev MANPATH
|
2006-04-10 18:02:57 +04:00
|
|
|
environment variable, or by the
|
1993-12-21 05:59:25 +03:00
|
|
|
.Fl M
|
|
|
|
and
|
|
|
|
.Fl m
|
|
|
|
options.
|
2022-06-18 16:41:12 +03:00
|
|
|
.It Ic _suffix
|
2006-04-10 18:02:57 +04:00
|
|
|
identifies the set of suffixes used for formatted man pages
|
2006-04-14 01:15:50 +04:00
|
|
|
(the
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ql \&.0
|
2006-04-10 18:02:57 +04:00
|
|
|
suffix is normally used here).
|
|
|
|
Formatted man pages can be directly displayed to the user.
|
2022-06-18 16:41:12 +03:00
|
|
|
Each suffix may contain the normal shell globbing characters
|
|
|
|
.Po
|
|
|
|
.Em not
|
|
|
|
including csh-style curly braces
|
|
|
|
.Pc .
|
|
|
|
.It Ic _version
|
2013-06-28 01:55:10 +04:00
|
|
|
Contains the version of the configuration file.
|
2022-06-18 16:41:12 +03:00
|
|
|
.It Ic _ Ns Aq Ar machine
|
2013-06-28 01:55:10 +04:00
|
|
|
Defines additional paths to be searched for the particular
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ar machine
|
2022-06-18 05:19:07 +03:00
|
|
|
hardware name whose literal value is taken from
|
2012-04-29 07:46:43 +04:00
|
|
|
.Xr uname 1
|
|
|
|
.Fl m .
|
2022-06-19 21:51:06 +03:00
|
|
|
For example, on an amd64, the
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ic _amd64
|
|
|
|
control keyword is used, where
|
|
|
|
.Ql x86
|
2022-06-19 21:51:06 +03:00
|
|
|
is supplied by default as an alternate machine path to also search.
|
1993-12-21 05:59:25 +03:00
|
|
|
.El
|
|
|
|
.Pp
|
2006-04-14 01:15:50 +04:00
|
|
|
Section configuration lines in
|
2006-04-10 18:02:57 +04:00
|
|
|
.Nm
|
|
|
|
consist of a section keyword naming the section and a configuration
|
|
|
|
string that defines the directory or subdirectory path that the section's
|
|
|
|
manual pages are located in.
|
|
|
|
The path may contain the normal shell globbing characters,
|
2022-06-18 16:41:12 +03:00
|
|
|
including csh-style curly braces;
|
2006-04-10 18:02:57 +04:00
|
|
|
to escape a shell globbing character,
|
|
|
|
precede it with a backslash
|
2022-06-18 16:41:12 +03:00
|
|
|
.Pq Ql \e .
|
2006-04-10 18:02:57 +04:00
|
|
|
Section keywords must not start with the
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ql _
|
2006-04-10 18:02:57 +04:00
|
|
|
character.
|
1993-12-21 05:59:25 +03:00
|
|
|
.Pp
|
2006-04-10 18:02:57 +04:00
|
|
|
A section path may contain either a list of absolute directories or
|
2022-06-18 05:19:07 +03:00
|
|
|
a list of relative directories (but not both).
|
2006-04-14 01:15:50 +04:00
|
|
|
Relative directory paths are treated as a list of subdirectories that
|
2006-04-10 18:02:57 +04:00
|
|
|
are appended to the current man path directory being searched.
|
|
|
|
Section configuration lines with absolute directory paths (starting with
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ql / )
|
2006-04-10 18:02:57 +04:00
|
|
|
completely replace the current man search path directory with their
|
|
|
|
content.
|
|
|
|
.Pp
|
|
|
|
Section configuration lines with absolute directory paths ending
|
|
|
|
with a trailing slash character are expected to contain subdirectories
|
|
|
|
of manual pages, (see the keyword
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ic _subdir
|
2006-04-10 18:02:57 +04:00
|
|
|
above).
|
|
|
|
The
|
2022-06-18 16:41:12 +03:00
|
|
|
.Ic _subdir
|
2006-04-14 01:15:50 +04:00
|
|
|
subdirectory list is not applied to absolute section directories
|
2006-04-10 18:02:57 +04:00
|
|
|
if there is no trailing slash.
|
|
|
|
.Pp
|
2006-04-14 01:15:50 +04:00
|
|
|
In addition to the above rules, the
|
2006-04-10 18:02:57 +04:00
|
|
|
.Xr man 1
|
|
|
|
command also always checks in each directory that it searches for
|
|
|
|
a subdirectory with the same name as the current machine type.
|
2022-06-18 05:19:07 +03:00
|
|
|
If a machine-specific subdirectory is found, it is also searched
|
|
|
|
before the parent directory is.
|
2006-04-14 01:15:50 +04:00
|
|
|
This allows the manual to contain machine-specific man pages.
|
|
|
|
Note that the machine subdirectory does not need to be specified
|
|
|
|
in the
|
2006-04-10 18:02:57 +04:00
|
|
|
.Nm
|
|
|
|
file.
|
|
|
|
.Pp
|
2006-04-14 01:15:50 +04:00
|
|
|
Multiple specifications for all types of
|
2006-04-10 18:02:57 +04:00
|
|
|
.Nm
|
2006-04-14 01:15:50 +04:00
|
|
|
configuration lines are
|
|
|
|
cumulative and the entries are used in the order listed in the file;
|
2006-04-10 18:02:57 +04:00
|
|
|
multiple entries may be listed per line, as well.
|
2001-12-01 23:35:54 +03:00
|
|
|
.Sh FILES
|
2022-06-18 16:41:12 +03:00
|
|
|
.Bl -tag -width Pa -compact
|
2001-12-01 23:35:54 +03:00
|
|
|
.It Pa /etc/man.conf
|
2006-04-10 18:02:57 +04:00
|
|
|
Standard manual configuration file.
|
2001-12-01 23:35:54 +03:00
|
|
|
.El
|
1993-12-21 05:59:25 +03:00
|
|
|
.Sh EXAMPLES
|
|
|
|
Given the following
|
1997-10-19 09:05:24 +04:00
|
|
|
.Nm
|
1993-12-21 05:59:25 +03:00
|
|
|
file:
|
|
|
|
.Bd -literal -offset indent
|
1993-12-21 06:05:17 +03:00
|
|
|
_version BSD.2
|
1993-12-21 05:59:25 +03:00
|
|
|
_subdir cat[123]
|
|
|
|
_suffix .0
|
|
|
|
_build .[1-9] nroff -man %s
|
|
|
|
_build .tbl tbl %s | nroff -man
|
2012-04-29 07:46:43 +04:00
|
|
|
_i386 x86
|
1993-12-21 05:59:25 +03:00
|
|
|
_default /usr/share/man/
|
|
|
|
sect3 /usr/share/man/{old/,}cat3
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
By default, the command
|
|
|
|
.Dq Li man mktemp
|
|
|
|
will search for
|
2022-06-18 16:41:12 +03:00
|
|
|
.Pa mktemp. Ns Aq Ar digit
|
2002-09-30 14:32:16 +04:00
|
|
|
and
|
2022-06-18 16:41:12 +03:00
|
|
|
.Pa mktemp.tbl
|
1993-12-21 05:59:25 +03:00
|
|
|
in the directories
|
2022-06-18 16:41:12 +03:00
|
|
|
.Pa /usr/share/man/cat1 ,
|
|
|
|
.Pa /usr/share/man/cat2 ,
|
1993-12-21 05:59:25 +03:00
|
|
|
and
|
2022-06-18 16:41:12 +03:00
|
|
|
.Pa /usr/share/man/cat3 .
|
2002-09-30 14:32:16 +04:00
|
|
|
If on a machine of type
|
|
|
|
.Dq vax ,
|
|
|
|
the subdirectory
|
2022-06-18 16:41:12 +03:00
|
|
|
.Pa vax
|
2002-09-30 14:32:16 +04:00
|
|
|
in each
|
1993-12-21 05:59:25 +03:00
|
|
|
directory would be searched as well, before the directory was
|
|
|
|
searched.
|
|
|
|
.Pp
|
2002-09-30 14:32:16 +04:00
|
|
|
If
|
2022-06-18 16:41:12 +03:00
|
|
|
.Pa mktemp.tbl
|
2002-09-30 14:32:16 +04:00
|
|
|
was found first, the command
|
2022-06-18 16:41:12 +03:00
|
|
|
.Dq Li tbl Ao Ar manual page Ac Li \&| nroff -man
|
1993-12-21 05:59:25 +03:00
|
|
|
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
|
2022-06-18 16:41:12 +03:00
|
|
|
.Pa /usr/share/man/old/cat3
|
1993-12-21 05:59:25 +03:00
|
|
|
and
|
2022-06-18 16:41:12 +03:00
|
|
|
.Pa /usr/share/man/cat3 ,
|
1993-12-21 05:59:25 +03:00
|
|
|
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 SEE ALSO
|
|
|
|
.Xr apropos 1 ,
|
|
|
|
.Xr machine 1 ,
|
|
|
|
.Xr man 1 ,
|
|
|
|
.Xr whatis 1 ,
|
|
|
|
.Xr whereis 1 ,
|
|
|
|
.Xr fnmatch 3 ,
|
2002-03-09 01:18:04 +03:00
|
|
|
.Xr glob 3 ,
|
2007-02-10 22:27:39 +03:00
|
|
|
.Xr catman 8 ,
|
2016-06-16 18:11:43 +03:00
|
|
|
.Xr makemandb 8
|