xref: /minix3/external/bsd/mdocml/dist/apropos.1 (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc.\"	Id: apropos.1,v 1.22 2013/10/01 20:56:18 schwarze Exp
292395e9cSLionel Sambuc.\"
384d9c625SLionel Sambuc.\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
492395e9cSLionel Sambuc.\"
592395e9cSLionel Sambuc.\" Permission to use, copy, modify, and distribute this software for any
692395e9cSLionel Sambuc.\" purpose with or without fee is hereby granted, provided that the above
792395e9cSLionel Sambuc.\" copyright notice and this permission notice appear in all copies.
892395e9cSLionel Sambuc.\"
992395e9cSLionel Sambuc.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1092395e9cSLionel Sambuc.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1192395e9cSLionel Sambuc.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1292395e9cSLionel Sambuc.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1392395e9cSLionel Sambuc.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1492395e9cSLionel Sambuc.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1592395e9cSLionel Sambuc.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1692395e9cSLionel Sambuc.\"
17*0a6a1f1dSLionel Sambuc.Dd October 1, 2013
1892395e9cSLionel Sambuc.Dt APROPOS 1
1992395e9cSLionel Sambuc.Os
2092395e9cSLionel Sambuc.Sh NAME
21*0a6a1f1dSLionel Sambuc.Nm apropos ,
22*0a6a1f1dSLionel Sambuc.Nm whatis
2392395e9cSLionel Sambuc.Nd search manual page databases
2492395e9cSLionel Sambuc.Sh SYNOPSIS
2592395e9cSLionel Sambuc.Nm
2692395e9cSLionel Sambuc.Op Fl C Ar file
27*0a6a1f1dSLionel Sambuc.Op Fl M Ar path
28*0a6a1f1dSLionel Sambuc.Op Fl m Ar path
2992395e9cSLionel Sambuc.Op Fl S Ar arch
3092395e9cSLionel Sambuc.Op Fl s Ar section
3192395e9cSLionel Sambuc.Ar expression ...
3292395e9cSLionel Sambuc.Sh DESCRIPTION
3392395e9cSLionel SambucThe
34*0a6a1f1dSLionel Sambuc.Nm apropos
35*0a6a1f1dSLionel Sambucand
36*0a6a1f1dSLionel Sambuc.Nm whatis
37*0a6a1f1dSLionel Sambucutilities query manual page databases generated by
3892395e9cSLionel Sambuc.Xr mandocdb 8 ,
3992395e9cSLionel Sambucevaluating on
4092395e9cSLionel Sambuc.Ar expression
4192395e9cSLionel Sambucfor each file in each database.
4292395e9cSLionel Sambuc.Pp
4392395e9cSLionel SambucBy default,
4492395e9cSLionel Sambuc.Nm
4592395e9cSLionel Sambucsearches for
4692395e9cSLionel Sambuc.Xr mandocdb 8
4792395e9cSLionel Sambucdatabases in the default paths stipulated by
48*0a6a1f1dSLionel Sambuc.Xr man 1
49*0a6a1f1dSLionel Sambucand
50*0a6a1f1dSLionel Sambucmaps terms to case-sensitive manual names and descriptions.
51*0a6a1f1dSLionel SambucMultiple terms are OR'd.
52*0a6a1f1dSLionel Sambuc.Nm whatis
53*0a6a1f1dSLionel Sambucmaps terms only to case-sensitive manual names.
5492395e9cSLionel Sambuc.Pp
5592395e9cSLionel SambucIts arguments are as follows:
5692395e9cSLionel Sambuc.Bl -tag -width Ds
5792395e9cSLionel Sambuc.It Fl C Ar file
5892395e9cSLionel SambucSpecify an alternative configuration
5992395e9cSLionel Sambuc.Ar file
6092395e9cSLionel Sambucin
6192395e9cSLionel Sambuc.Xr man.conf 5
6292395e9cSLionel Sambucformat.
63*0a6a1f1dSLionel Sambuc.It Fl M Ar path
6492395e9cSLionel SambucUse the colon-separated path instead of the default list of paths
6592395e9cSLionel Sambucsearched for
6692395e9cSLionel Sambuc.Xr mandocdb 8
6792395e9cSLionel Sambucdatabases.
6892395e9cSLionel SambucInvalid paths, or paths without manual databases, are ignored.
69*0a6a1f1dSLionel Sambuc.It Fl m Ar path
7092395e9cSLionel SambucPrepend the colon-separated paths to the list of paths searched
7192395e9cSLionel Sambucfor
7292395e9cSLionel Sambuc.Xr mandocdb 8
7392395e9cSLionel Sambucdatabases.
7492395e9cSLionel SambucInvalid paths, or paths without manual databases, are ignored.
7592395e9cSLionel Sambuc.It Fl S Ar arch
7692395e9cSLionel SambucSearch only for a particular architecture.
7792395e9cSLionel Sambuc.It Fl s Ar cat
7892395e9cSLionel SambucSearch only for a manual section.
7992395e9cSLionel SambucSee
8092395e9cSLionel Sambuc.Xr man 1
8192395e9cSLionel Sambucfor a listing of manual sections.
8292395e9cSLionel Sambuc.El
8392395e9cSLionel Sambuc.Pp
84*0a6a1f1dSLionel Sambuc.Nm whatis
85*0a6a1f1dSLionel Sambucconsiders an
8692395e9cSLionel Sambuc.Ar expression
87*0a6a1f1dSLionel Sambucto consist of an opaque keyword.
88*0a6a1f1dSLionel Sambuc.Nm apropos
89*0a6a1f1dSLionel Sambucparses a
90*0a6a1f1dSLionel Sambuc.Ar expression
91*0a6a1f1dSLionel Sambucinto type and keyword pairs.
92*0a6a1f1dSLionel SambucThis pair syntax
9392395e9cSLionel Sambuc.Li [key[,key]*(=~)]?val ,
9492395e9cSLionel Sambucwhere operand
9592395e9cSLionel Sambuc.Cm key
9692395e9cSLionel Sambucis an
9792395e9cSLionel Sambuc.Xr mdoc 7
9892395e9cSLionel Sambucmacro to query and
9992395e9cSLionel Sambuc.Cm val
10092395e9cSLionel Sambucis its value.
10192395e9cSLionel SambucSee
10292395e9cSLionel Sambuc.Sx Macro Keys
10392395e9cSLionel Sambucfor a list of available keys.
10492395e9cSLionel SambucOperator
10592395e9cSLionel Sambuc.Li \&=
106*0a6a1f1dSLionel Sambucevaluates a full string, while
10792395e9cSLionel Sambuc.Li \&~
108*0a6a1f1dSLionel Sambucevaluates a
109*0a6a1f1dSLionel Sambuc.Xr glob 7
110*0a6a1f1dSLionel Sambucpattern.
11192395e9cSLionel Sambuc.Pp
11292395e9cSLionel SambucResults are sorted by manual title, with output formatted as
113*0a6a1f1dSLionel Sambuc.Qq title(sec) \- description
114*0a6a1f1dSLionel Sambucwhere
11592395e9cSLionel Sambuc.Qq title
11692395e9cSLionel Sambucis the manual's title (note multiple manual names may exist for one
11792395e9cSLionel Sambuctitle),
11892395e9cSLionel Sambuc.Qq sec
11992395e9cSLionel Sambucis the manual section, and
12092395e9cSLionel Sambuc.Qq description
12192395e9cSLionel Sambucis the manual's short description.
12292395e9cSLionel SambucIf an architecture is specified for the manual, it is displayed as
123*0a6a1f1dSLionel Sambuc.Qq title(cat/arch) \- description .
12492395e9cSLionel Sambuc.Ss Macro Keys
125*0a6a1f1dSLionel Sambuc.Nm apropos
126*0a6a1f1dSLionel Sambucqueries evaluate over a subset of
12792395e9cSLionel Sambuc.Xr mdoc 7
12892395e9cSLionel Sambucmacros indexed by
12992395e9cSLionel Sambuc.Xr mandocdb 8 .
13092395e9cSLionel SambucIn addition to the macro keys listed below, the special key
13192395e9cSLionel Sambuc.Cm any
13292395e9cSLionel Sambucmay be used to match any available macro key.
13392395e9cSLionel Sambuc.Pp
13492395e9cSLionel SambucNames and description:
13592395e9cSLionel Sambuc.Bl -column "xLix" description -offset indent -compact
13692395e9cSLionel Sambuc.It Li \&Nm Ta manual name
13792395e9cSLionel Sambuc.It Li \&Nd Ta one-line manual description
13892395e9cSLionel Sambuc.El
13992395e9cSLionel Sambuc.Pp
14092395e9cSLionel SambucSections and cross references:
14192395e9cSLionel Sambuc.Bl -column "xLix" description -offset indent -compact
14292395e9cSLionel Sambuc.It Li \&Sh Ta section header (excluding standard sections)
14392395e9cSLionel Sambuc.It Li \&Ss Ta subsection header
14492395e9cSLionel Sambuc.It Li \&Xr Ta cross reference to another manual page
14592395e9cSLionel Sambuc.It Li \&Rs Ta bibliographic reference
14692395e9cSLionel Sambuc.El
14792395e9cSLionel Sambuc.Pp
14892395e9cSLionel SambucSemantic markup for command line utilities:
14992395e9cSLionel Sambuc.Bl -column "xLix" description -offset indent -compact
15092395e9cSLionel Sambuc.It Li \&Fl Ta command line options (flags)
15192395e9cSLionel Sambuc.It Li \&Cm Ta command modifier
15292395e9cSLionel Sambuc.It Li \&Ar Ta command argument
15392395e9cSLionel Sambuc.It Li \&Ic Ta internal or interactive command
15492395e9cSLionel Sambuc.It Li \&Ev Ta environmental variable
15592395e9cSLionel Sambuc.It Li \&Pa Ta file system path
15692395e9cSLionel Sambuc.El
15792395e9cSLionel Sambuc.Pp
15892395e9cSLionel SambucSemantic markup for function libraries:
15992395e9cSLionel Sambuc.Bl -column "xLix" description -offset indent -compact
16092395e9cSLionel Sambuc.It Li \&Lb Ta function library name
16192395e9cSLionel Sambuc.It Li \&In Ta include file
16292395e9cSLionel Sambuc.It Li \&Ft Ta function return type
16392395e9cSLionel Sambuc.It Li \&Fn Ta function name
16492395e9cSLionel Sambuc.It Li \&Fa Ta function argument type and name
16592395e9cSLionel Sambuc.It Li \&Vt Ta variable type
16692395e9cSLionel Sambuc.It Li \&Va Ta variable name
16792395e9cSLionel Sambuc.It Li \&Dv Ta defined variable or preprocessor constant
16892395e9cSLionel Sambuc.It Li \&Er Ta error constant
16992395e9cSLionel Sambuc.It Li \&Ev Ta environmental variable
17092395e9cSLionel Sambuc.El
17192395e9cSLionel Sambuc.Pp
17292395e9cSLionel SambucVarious semantic markup:
17392395e9cSLionel Sambuc.Bl -column "xLix" description -offset indent -compact
17492395e9cSLionel Sambuc.It Li \&An Ta author name
17592395e9cSLionel Sambuc.It Li \&Lk Ta hyperlink
17692395e9cSLionel Sambuc.It Li \&Mt Ta Do mailto Dc hyperlink
17792395e9cSLionel Sambuc.It Li \&Cd Ta kernel configuration declaration
17892395e9cSLionel Sambuc.It Li \&Ms Ta mathematical symbol
17992395e9cSLionel Sambuc.It Li \&Tn Ta tradename
18092395e9cSLionel Sambuc.El
18192395e9cSLionel Sambuc.Pp
18292395e9cSLionel SambucPhysical markup:
18392395e9cSLionel Sambuc.Bl -column "xLix" description -offset indent -compact
18492395e9cSLionel Sambuc.It Li \&Em Ta italic font or underline
18592395e9cSLionel Sambuc.It Li \&Sy Ta boldface font
18692395e9cSLionel Sambuc.It Li \&Li Ta typewriter font
18792395e9cSLionel Sambuc.El
18892395e9cSLionel Sambuc.Pp
18992395e9cSLionel SambucText production:
19092395e9cSLionel Sambuc.Bl -column "xLix" description -offset indent -compact
19192395e9cSLionel Sambuc.It Li \&St Ta reference to a standards document
19292395e9cSLionel Sambuc.It Li \&At Ta At No version reference
19392395e9cSLionel Sambuc.It Li \&Bx Ta Bx No version reference
19492395e9cSLionel Sambuc.It Li \&Bsx Ta Bsx No version reference
19592395e9cSLionel Sambuc.It Li \&Nx Ta Nx No version reference
19692395e9cSLionel Sambuc.It Li \&Fx Ta Fx No version reference
19792395e9cSLionel Sambuc.It Li \&Ox Ta Ox No version reference
19892395e9cSLionel Sambuc.It Li \&Dx Ta Dx No version reference
19992395e9cSLionel Sambuc.El
20092395e9cSLionel Sambuc.Sh ENVIRONMENT
20192395e9cSLionel Sambuc.Bl -tag -width Ds
20292395e9cSLionel Sambuc.It Ev MANPATH
20392395e9cSLionel SambucColon-separated paths modifying the default list of paths searched for
20492395e9cSLionel Sambucmanual databases.
20592395e9cSLionel SambucInvalid paths, or paths without manual databases, are ignored.
20692395e9cSLionel SambucOverridden by
20792395e9cSLionel Sambuc.Fl M .
20892395e9cSLionel SambucIf
20992395e9cSLionel Sambuc.Ev MANPATH
21092395e9cSLionel Sambucbegins with a
21192395e9cSLionel Sambuc.Sq \&: ,
21292395e9cSLionel Sambucit is appended to the default list;
21392395e9cSLionel Sambucelse if it ends with
21492395e9cSLionel Sambuc.Sq \&: ,
21592395e9cSLionel Sambucit is prepended to the default list; else if it contains
21692395e9cSLionel Sambuc.Sq \&:: ,
21792395e9cSLionel Sambucthe default list is inserted between the colons.
21892395e9cSLionel SambucIf none of these conditions are met, it overrides the default list.
21992395e9cSLionel Sambuc.El
22092395e9cSLionel Sambuc.Sh FILES
22192395e9cSLionel Sambuc.Bl -tag -width "/etc/man.conf" -compact
222*0a6a1f1dSLionel Sambuc.It Pa mandoc.db
22392395e9cSLionel Sambucname of the
22492395e9cSLionel Sambuc.Xr mandocdb 8
22592395e9cSLionel Sambuckeyword database
22692395e9cSLionel Sambuc.It Pa /etc/man.conf
22792395e9cSLionel Sambucdefault
22892395e9cSLionel Sambuc.Xr man 1
22992395e9cSLionel Sambucconfiguration file
23092395e9cSLionel Sambuc.El
23192395e9cSLionel Sambuc.Sh EXIT STATUS
23292395e9cSLionel Sambuc.Ex -std
23392395e9cSLionel Sambuc.Sh EXAMPLES
23492395e9cSLionel SambucSearch for
23592395e9cSLionel Sambuc.Qq mdoc
236*0a6a1f1dSLionel Sambucas a word or
237*0a6a1f1dSLionel Sambuc.Xr glob 7
238*0a6a1f1dSLionel Sambucexpression:
23992395e9cSLionel Sambuc.Pp
24092395e9cSLionel Sambuc.Dl $ apropos mdoc
241*0a6a1f1dSLionel Sambuc.Dl $ apropos any~mdoc*
24292395e9cSLionel Sambuc.Pp
24392395e9cSLionel SambucInclude matches for
24492395e9cSLionel Sambuc.Qq roff
24592395e9cSLionel Sambucand
24692395e9cSLionel Sambuc.Qq man
247*0a6a1f1dSLionel Sambucusing
248*0a6a1f1dSLionel Sambuc.Xr glob 7
249*0a6a1f1dSLionel Sambucexpressions:
25092395e9cSLionel Sambuc.Pp
251*0a6a1f1dSLionel Sambuc.Dl $ apropos ~*mdoc* ~*roff*
25292395e9cSLionel Sambuc.Pp
25392395e9cSLionel SambucSearch for
25492395e9cSLionel Sambuc.Qq optarg
255*0a6a1f1dSLionel Sambucas a variable name in the library category:
25692395e9cSLionel Sambuc.Pp
257*0a6a1f1dSLionel Sambuc.Dl $ apropos \-s 3 Va=optarg
25892395e9cSLionel Sambuc.Sh SEE ALSO
259*0a6a1f1dSLionel Sambuc.Xr glob 7 ,
26092395e9cSLionel Sambuc.Xr mandocdb 8
26192395e9cSLionel Sambuc.Sh AUTHORS
26292395e9cSLionel SambucThe
26392395e9cSLionel Sambuc.Nm
26492395e9cSLionel Sambucutility was written by
265*0a6a1f1dSLionel Sambuc.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
266