1*0a6a1f1dSLionel Sambuc.\" $NetBSD: man.conf.5,v 1.26 2015/04/07 10:17:21 plunky Exp $ 20c3983b2SBen Gras.\" 30c3983b2SBen Gras.\" Copyright (c) 1989, 1991, 1993 40c3983b2SBen Gras.\" The Regents of the University of California. All rights reserved. 50c3983b2SBen Gras.\" 60c3983b2SBen Gras.\" Redistribution and use in source and binary forms, with or without 70c3983b2SBen Gras.\" modification, are permitted provided that the following conditions 80c3983b2SBen Gras.\" are met: 90c3983b2SBen Gras.\" 1. Redistributions of source code must retain the above copyright 100c3983b2SBen Gras.\" notice, this list of conditions and the following disclaimer. 110c3983b2SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright 120c3983b2SBen Gras.\" notice, this list of conditions and the following disclaimer in the 130c3983b2SBen Gras.\" documentation and/or other materials provided with the distribution. 140c3983b2SBen Gras.\" 3. Neither the name of the University nor the names of its contributors 150c3983b2SBen Gras.\" may be used to endorse or promote products derived from this software 160c3983b2SBen Gras.\" without specific prior written permission. 170c3983b2SBen Gras.\" 180c3983b2SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 190c3983b2SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 200c3983b2SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 210c3983b2SBen Gras.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 220c3983b2SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 230c3983b2SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 240c3983b2SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 250c3983b2SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 260c3983b2SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 270c3983b2SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 280c3983b2SBen Gras.\" SUCH DAMAGE. 290c3983b2SBen Gras.\" 300c3983b2SBen Gras.\" @(#)man.conf.5 8.5 (Berkeley) 1/2/94 310c3983b2SBen Gras.\" 32*0a6a1f1dSLionel Sambuc.Dd March 3, 2015 330c3983b2SBen Gras.Dt MAN.CONF 5 340c3983b2SBen Gras.Os 350c3983b2SBen Gras.Sh NAME 360c3983b2SBen Gras.Nm man.conf 370c3983b2SBen Gras.Nd configuration file for manual pages 380c3983b2SBen Gras.Sh DESCRIPTION 390c3983b2SBen GrasThe 400c3983b2SBen Gras.Nm 410c3983b2SBen Grasfile contains the default configuration used by 420c3983b2SBen Gras.Xr man 1 , 430c3983b2SBen Gras.Xr apropos 1 , 440c3983b2SBen Gras.Xr whatis 1 , 450c3983b2SBen Gras.Xr catman 8 , 460c3983b2SBen Grasand 47*0a6a1f1dSLionel Sambuc.Xr makemandb 8 480c3983b2SBen Grasto find manual pages and information about manual pages (e.g. the 490c3983b2SBen Graswhatis database). 500c3983b2SBen Gras.Pp 510c3983b2SBen GrasManual pages are located by searching an ordered set of directories 520c3983b2SBen Grascalled the 530c3983b2SBen Gras.Dq man path 540c3983b2SBen Grasfor a file that matches the name of the requested page. 550c3983b2SBen GrasEach directory in the search path usually has a set of subdirectories 560c3983b2SBen Grasin it (though this is not required). 570c3983b2SBen GrasWhen subdirectories are used, there are normally two subdirectories 580c3983b2SBen Grasfor each section of the manual. 590c3983b2SBen GrasOne subdirectory contains formatted copies of that section's manual 600c3983b2SBen Graspages that can be directly displayed to a terminal, while the other 610c3983b2SBen Grassection subdirectory contains unformatted copies of the pages (see 620c3983b2SBen Gras.Xr nroff 1 630c3983b2SBen Grasand 640c3983b2SBen Gras.Xr mdoc 7 ) . 650c3983b2SBen GrasFormatted manual pages are normally named with a trailing 660c3983b2SBen Gras.Dq \.0 670c3983b2SBen Grassuffix. 680c3983b2SBen Gras.Pp 690c3983b2SBen GrasThe 700c3983b2SBen Gras.Nm 710c3983b2SBen Grasfile contains comment and configuration lines. 720c3983b2SBen GrasComment lines start with the 730c3983b2SBen Gras.Dq # 740c3983b2SBen Grascharacter. 750c3983b2SBen GrasBlank lines are also treated as comment lines. 760c3983b2SBen GrasConfiguration lines consist of a configuration keyword followed by a 770c3983b2SBen Grasconfiguration string. 780c3983b2SBen GrasThere are two types of configuration keywords: control keywords and 790c3983b2SBen Grassection keywords. 800c3983b2SBen GrasControl keywords must start with the 810c3983b2SBen Gras.Dq _ 820c3983b2SBen Grascharacter. 830c3983b2SBen GrasThe following control keywords are currently defined: 8484d9c625SLionel Sambuc.Bl -tag -width XXmachineX 850c3983b2SBen Gras.It _build 8684d9c625SLionel SambucIdentifies the set of suffixes used for manual pages that must be 870c3983b2SBen Grasformatted for display and the command that should be used to format 880c3983b2SBen Grasthem. 890c3983b2SBen GrasManual file names, regardless of their format, are expected to end in a 900c3983b2SBen Gras.Dq \.* 910c3983b2SBen Graspattern, i.e. a 920c3983b2SBen Gras.Dq \&\. 930c3983b2SBen Grasfollowed by some suffix. 940c3983b2SBen GrasThe first field of a _build line contains a man page suffix specification. 950c3983b2SBen GrasThe suffix specification may contain the normal shell globbing characters 960c3983b2SBen Gras(NOT including curly braces 970c3983b2SBen Gras.Pq Dq {} ) . 980c3983b2SBen GrasThe rest of the _build line is a shell command line whose standard 990c3983b2SBen Grasoutput is a formatted manual page that can be directly displayed to 1000c3983b2SBen Grasthe user. 101b9a6a72bSLionel SambucThere should be exactly one occurrence of the string 1020c3983b2SBen Gras.Dq %s 103b9a6a72bSLionel Sambucin the shell command line, and it will 1040c3983b2SBen Grasbe replaced by the name of the file which is being formatted. 1050c3983b2SBen Gras.It _crunch 10684d9c625SLionel SambucUsed by 1070c3983b2SBen Gras.Xr catman 8 1080c3983b2SBen Grasto determine how to crunch formatted pages 1090c3983b2SBen Graswhich originally were compressed man pages: The first field lists a suffix 1100c3983b2SBen Graswhich indicates what kind of compression were used to compress the man page. 1110c3983b2SBen GrasThe rest of the line must be a shell command line, used to compress the 1120c3983b2SBen Grasformatted pages. 113b9a6a72bSLionel SambucThere should be exactly one occurrence of the string 114b9a6a72bSLionel Sambuc.Dq %s 115b9a6a72bSLionel Sambucin the shell command line, and it will 116b9a6a72bSLionel Sambucbe replaced by the name of the output file. 1170c3983b2SBen Gras.It _default 11884d9c625SLionel SambucContains the system-wide default man path used to search for man pages. 119*0a6a1f1dSLionel Sambuc.It _mandb 120*0a6a1f1dSLionel SambucDefines the full pathname (not just a directory path) for a database to 121*0a6a1f1dSLionel Sambucbe used 122*0a6a1f1dSLionel Sambucby the 123*0a6a1f1dSLionel Sambuc.Xr apropos 1 124*0a6a1f1dSLionel Sambucand 125*0a6a1f1dSLionel Sambuc.Xr whatis 1 126*0a6a1f1dSLionel Sambuccommands. 127*0a6a1f1dSLionel SambucThe pathname may contain the normal shell globbing characters, 128*0a6a1f1dSLionel Sambucincluding curly braces 129*0a6a1f1dSLionel Sambuc.Pq Dq {} ; 130*0a6a1f1dSLionel Sambucto escape a shell globbing character, 131*0a6a1f1dSLionel Sambucprecede it with a backslash 132*0a6a1f1dSLionel Sambuc.Pq Dq \e . 1330c3983b2SBen Gras.It _subdir 13484d9c625SLionel SambucContains the list (in search order) of section subdirectories which will 1350c3983b2SBen Grasbe searched in any man path directory named with a trailing slash 1360c3983b2SBen Gras.Pq Dq / 1370c3983b2SBen Grascharacter. 1380c3983b2SBen GrasThis list is also used, even if there is no trailing slash character, 1390c3983b2SBen Graswhen a path is specified to the 1400c3983b2SBen Gras.Xr man 1 1410c3983b2SBen Grasutility by the user, by the 1420c3983b2SBen Gras.Ev MANPATH 1430c3983b2SBen Grasenvironment variable, or by the 1440c3983b2SBen Gras.Fl M 1450c3983b2SBen Grasand 1460c3983b2SBen Gras.Fl m 1470c3983b2SBen Grasoptions. 1480c3983b2SBen Gras.It _suffix 1490c3983b2SBen Grasidentifies the set of suffixes used for formatted man pages 1500c3983b2SBen Gras(the 1510c3983b2SBen Gras.Dq \.0 1520c3983b2SBen Grassuffix is normally used here). 1530c3983b2SBen GrasFormatted man pages can be directly displayed to the user. 1540c3983b2SBen GrasEach suffix may contain the normal shell globbing characters (NOT 1550c3983b2SBen Grasincluding curly braces 1560c3983b2SBen Gras.Pq Dq {} ) . 1570c3983b2SBen Gras.It _version 15884d9c625SLionel SambucContains the version of the configuration file. 15984d9c625SLionel Sambuc.It _ Ns Aq machine 16084d9c625SLionel SambucDefines additional paths to be searched for the particular 161b9a6a72bSLionel Sambuc.Dv machine 162b9a6a72bSLionel Sambucwhose literal value is taken from 163b9a6a72bSLionel Sambuc.Xr uname 1 164b9a6a72bSLionel Sambuc.Fl m . 165b9a6a72bSLionel SambucFor example on an 166b9a6a72bSLionel Sambuc.Dv amd64 , 167b9a6a72bSLionel Sambuc.Dv _amd64 168b9a6a72bSLionel Sambucis used. 1690c3983b2SBen Gras.El 1700c3983b2SBen Gras.Pp 1710c3983b2SBen GrasSection configuration lines in 1720c3983b2SBen Gras.Nm 1730c3983b2SBen Grasconsist of a section keyword naming the section and a configuration 1740c3983b2SBen Grasstring that defines the directory or subdirectory path that the section's 1750c3983b2SBen Grasmanual pages are located in. 1760c3983b2SBen GrasThe path may contain the normal shell globbing characters, 1770c3983b2SBen Grasincluding curly braces 1780c3983b2SBen Gras.Pq Dq {} ; 1790c3983b2SBen Grasto escape a shell globbing character, 1800c3983b2SBen Grasprecede it with a backslash 1810c3983b2SBen Gras.Pq Dq \e . 1820c3983b2SBen GrasSection keywords must not start with the 1830c3983b2SBen Gras.Dq _ 1840c3983b2SBen Grascharacter. 1850c3983b2SBen Gras.Pp 1860c3983b2SBen GrasA section path may contain either a list of absolute directories or 1870c3983b2SBen Grasa list of or relative directories (but not both). 1880c3983b2SBen GrasRelative directory paths are treated as a list of subdirectories that 1890c3983b2SBen Grasare appended to the current man path directory being searched. 1900c3983b2SBen GrasSection configuration lines with absolute directory paths (starting with 1910c3983b2SBen Gras.Dq / ) 1920c3983b2SBen Grascompletely replace the current man search path directory with their 1930c3983b2SBen Grascontent. 1940c3983b2SBen Gras.Pp 1950c3983b2SBen GrasSection configuration lines with absolute directory paths ending 1960c3983b2SBen Graswith a trailing slash character are expected to contain subdirectories 1970c3983b2SBen Grasof manual pages, (see the keyword 1980c3983b2SBen Gras.Dq _subdir 1990c3983b2SBen Grasabove). 2000c3983b2SBen GrasThe 2010c3983b2SBen Gras.Dq _subdir 2020c3983b2SBen Grassubdirectory list is not applied to absolute section directories 2030c3983b2SBen Grasif there is no trailing slash. 2040c3983b2SBen Gras.Pp 2050c3983b2SBen GrasIn addition to the above rules, the 2060c3983b2SBen Gras.Xr man 1 2070c3983b2SBen Grascommand also always checks in each directory that it searches for 2080c3983b2SBen Grasa subdirectory with the same name as the current machine type. 2090c3983b2SBen GrasIf the machine-specific directory is found, it is also searched. 2100c3983b2SBen GrasThis allows the manual to contain machine-specific man pages. 2110c3983b2SBen GrasNote that the machine subdirectory does not need to be specified 2120c3983b2SBen Grasin the 2130c3983b2SBen Gras.Nm 2140c3983b2SBen Grasfile. 2150c3983b2SBen Gras.Pp 2160c3983b2SBen GrasMultiple specifications for all types of 2170c3983b2SBen Gras.Nm 2180c3983b2SBen Grasconfiguration lines are 2190c3983b2SBen Grascumulative and the entries are used in the order listed in the file; 2200c3983b2SBen Grasmultiple entries may be listed per line, as well. 2210c3983b2SBen Gras.Sh FILES 2220c3983b2SBen Gras.Bl -tag -width /etc/man.conf -compact 2230c3983b2SBen Gras.It Pa /etc/man.conf 2240c3983b2SBen GrasStandard manual configuration file. 2250c3983b2SBen Gras.El 2260c3983b2SBen Gras.Sh EXAMPLES 2270c3983b2SBen GrasGiven the following 2280c3983b2SBen Gras.Nm 2290c3983b2SBen Grasfile: 2300c3983b2SBen Gras.Bd -literal -offset indent 2310c3983b2SBen Gras_version BSD.2 2320c3983b2SBen Gras_subdir cat[123] 2330c3983b2SBen Gras_suffix .0 2340c3983b2SBen Gras_build .[1-9] nroff -man %s 2350c3983b2SBen Gras_build .tbl tbl %s | nroff -man 236b9a6a72bSLionel Sambuc_i386 x86 2370c3983b2SBen Gras_default /usr/share/man/ 2380c3983b2SBen Grassect3 /usr/share/man/{old/,}cat3 2390c3983b2SBen Gras.Ed 2400c3983b2SBen Gras.Pp 2410c3983b2SBen GrasBy default, the command 2420c3983b2SBen Gras.Dq Li man mktemp 2430c3983b2SBen Graswill search for 24484d9c625SLionel Sambuc.Dq mktemp. Ns Aq any_digit 2450c3983b2SBen Grasand 2460c3983b2SBen Gras.Dq mktemp.tbl 2470c3983b2SBen Grasin the directories 2480c3983b2SBen Gras.Dq Pa /usr/share/man/cat1 , 2490c3983b2SBen Gras.Dq Pa /usr/share/man/cat2 , 2500c3983b2SBen Grasand 2510c3983b2SBen Gras.Dq Pa /usr/share/man/cat3 . 2520c3983b2SBen GrasIf on a machine of type 2530c3983b2SBen Gras.Dq vax , 2540c3983b2SBen Grasthe subdirectory 2550c3983b2SBen Gras.Dq vax 2560c3983b2SBen Grasin each 2570c3983b2SBen Grasdirectory would be searched as well, before the directory was 2580c3983b2SBen Grassearched. 2590c3983b2SBen Gras.Pp 2600c3983b2SBen GrasIf 2610c3983b2SBen Gras.Dq mktemp.tbl 2620c3983b2SBen Graswas found first, the command 26384d9c625SLionel Sambuc.Dq Li tbl Ao manual page Ac | nroff -man 2640c3983b2SBen Graswould be run to build a man page for display to the user. 2650c3983b2SBen Gras.Pp 2660c3983b2SBen GrasThe command 2670c3983b2SBen Gras.Dq Li man sect3 mktemp 2680c3983b2SBen Graswould search the directories 2690c3983b2SBen Gras.Dq Pa /usr/share/man/old/cat3 2700c3983b2SBen Grasand 2710c3983b2SBen Gras.Dq Pa /usr/share/man/cat3 , 2720c3983b2SBen Grasin that order, for 2730c3983b2SBen Grasthe mktemp manual page. 2740c3983b2SBen GrasIf a subdirectory with the same name as the current machine type 2750c3983b2SBen Grasexisted in any of them, it would be searched as well, before each 2760c3983b2SBen Grasof them were searched. 2770c3983b2SBen Gras.Sh SEE ALSO 2780c3983b2SBen Gras.Xr apropos 1 , 2790c3983b2SBen Gras.Xr machine 1 , 2800c3983b2SBen Gras.Xr man 1 , 2810c3983b2SBen Gras.Xr whatis 1 , 2820c3983b2SBen Gras.Xr whereis 1 , 2830c3983b2SBen Gras.Xr fnmatch 3 , 2840c3983b2SBen Gras.Xr glob 3 , 2850c3983b2SBen Gras.Xr catman 8 , 2860c3983b2SBen Gras.Xr makewhatis 8 287