1 .\" $Id: apropos.1,v 1.12 2011/11/29 10:59:19 kristaps Exp $
3 .\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .Dd $Mdocdate: November 29 2011 $
22 .Nd search manual page databases
33 utility queries manual page databases generated by
37 for each file in each database.
38 Its arguments are as follows:
41 Use the colon-separated path instead of the default list of paths
45 Invalid paths, or paths without manual databases, are ignored.
47 Prepend the colon-separated paths to the list of paths searched
51 Invalid paths, or paths without manual databases, are ignored.
53 Search only for a particular architecture.
55 Search only for a manual section.
58 for a listing of manual sections.
63 consists of search terms joined by logical operators
71 operator has precedence over
73 and both are evaluated left-to-right.
75 .It \&( Ar expr No \&)
76 True if the subexpression
79 .It Ar expr1 Fl a Ar expr2
86 .It Ar expr1 Oo Fl o Oc Ar expr2
91 evaluate to true (logical
98 .Li [key[,key]*(=~)]?val ,
108 for a list of available keys.
111 evaluates a substring, while
113 evaluates a regular expression.
117 is a regular expression, it
118 is evaluated case-insensitively.
119 Has no effect on substring terms.
126 databases in the default paths stipulated by
128 parses terms as case-sensitive regular expressions
129 .Pq the Li \&~ operator
130 over manual names and descriptions
131 .Pq the Li \&Nm No and Li \&Nd No macro keys .
132 Multiple terms imply pairwise
134 Results are sorted by manual title, with output formatted as
136 .D1 title(sec) \- description
140 is the manual's title (note multiple manual names may exist for one
143 is the manual section, and
145 is the manual's short description.
146 If an architecture is specified for the manual, it is displayed as
148 .D1 title(cat/arch) \- description
150 Resulting manuals may be accessed as
152 .Dl $ man \-s sec title
154 If an architecture is specified in the output, use
156 .Dl $ man \-s sec \-S arch title
158 Queries evaluate over a subset of
162 In addition to the macro keys listed below, the special key
164 may be used to match any available macro key.
166 Names and description:
167 .Bl -column "xLix" description -offset indent -compact
168 .It Li \&Nm Ta manual name
169 .It Li \&Nd Ta one-line manual description
172 Sections and cross references:
173 .Bl -column "xLix" description -offset indent -compact
174 .It Li \&Sh Ta section header (excluding standard sections)
175 .It Li \&Ss Ta subsection header
176 .It Li \&Xr Ta cross reference to another manual page
177 .It Li \&Rs Ta bibliographic reference
180 Semantic markup for command line utilities:
181 .Bl -column "xLix" description -offset indent -compact
182 .It Li \&Fl Ta command line options (flags)
183 .It Li \&Cm Ta command modifier
184 .It Li \&Ar Ta command argument
185 .It Li \&Ic Ta internal or interactive command
186 .It Li \&Ev Ta environmental variable
187 .It Li \&Pa Ta file system path
190 Semantic markup for function libraries:
191 .Bl -column "xLix" description -offset indent -compact
192 .It Li \&Lb Ta function library name
193 .It Li \&In Ta include file
194 .It Li \&Ft Ta function return type
195 .It Li \&Fn Ta function name
196 .It Li \&Fa Ta function argument type and name
197 .It Li \&Vt Ta variable type
198 .It Li \&Va Ta variable name
199 .It Li \&Dv Ta defined variable or preprocessor constant
200 .It Li \&Er Ta error constant
201 .It Li \&Ev Ta environmental variable
204 Various semantic markup:
205 .Bl -column "xLix" description -offset indent -compact
206 .It Li \&An Ta author name
207 .It Li \&Lk Ta hyperlink
208 .It Li \&Mt Ta Do mailto Dc hyperlink
209 .It Li \&Cd Ta kernel configuration declaration
210 .It Li \&Ms Ta mathematical symbol
211 .It Li \&Tn Ta tradename
215 .Bl -column "xLix" description -offset indent -compact
216 .It Li \&Em Ta italic font or underline
217 .It Li \&Sy Ta boldface font
218 .It Li \&Li Ta typewriter font
222 .Bl -column "xLix" description -offset indent -compact
223 .It Li \&St Ta reference to a standards document
224 .It Li \&At Ta At No version reference
225 .It Li \&Bx Ta Bx No version reference
226 .It Li \&Bsx Ta Bsx No version reference
227 .It Li \&Nx Ta Nx No version reference
228 .It Li \&Fx Ta Fx No version reference
229 .It Li \&Ox Ta Ox No version reference
230 .It Li \&Dx Ta Dx No version reference
235 Colon-separated paths overriding the default list of paths searched for
237 Invalid paths, or paths without manual databases, are ignored.
246 as a substring and regular expression
247 within each manual name and description:
250 .Dl $ apropos ~^mdoc$
256 for the regular expression case:
258 .Dl $ apropos ~^mdoc$ roff man
259 .Dl $ apropos ~^mdoc$ \-o roff \-o man
265 as variable names in the library category:
267 .Dl $ apropos \-s 3 Va~^optind \-a Va~^optarg$
275 utility was written by
276 .An Kristaps Dzonsons ,
277 .Mt kristaps@bsd.lv .