1 .\" $Id: apropos.1,v 1.25 2014/04/04 15:55:19 schwarze Exp $
3 .\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
4 .\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
6 .\" Permission to use, copy, modify, and distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 .Dd $Mdocdate: April 4 2014 $
24 .Nd search manual page databases
39 utilities query manual page databases generated by
43 for each file in each database.
49 databases in the default paths stipulated by
51 parses terms as case-sensitive regular expressions
52 .Pq the Li \&~ operator
53 over manual names and descriptions
54 .Pq the Li \&Nm No and Li \&Nd No macro keys .
55 Multiple terms imply pairwise
58 maps terms only to case-sensitive manual names.
60 Its arguments are as follows:
63 Specify an alternative configuration
69 Use the colon-separated path instead of the default list of paths
73 Invalid paths, or paths without manual databases, are ignored.
75 Prepend the colon-separated paths to the list of paths searched
79 Invalid paths, or paths without manual databases, are ignored.
81 Show the values associated with the key
83 instead of the manual descriptions.
85 Restrict the search to pages for the specified
90 By default, pages for all architectures are shown.
92 Restrict the search to the specified section of the manual.
93 By default, pages from all sections are shown.
96 for a listing of sections.
101 consists of search terms joined by logical operators
109 operator has precedence over
111 and both are evaluated left-to-right.
113 .It \&( Ar expr No \&)
114 True if the subexpression
117 .It Ar expr1 Fl a Ar expr2
124 .It Ar expr1 Oo Fl o Oc Ar expr2
129 evaluate to true (logical
136 .Li [key[,key]*(=~)]?val ,
146 for a list of available keys.
149 evaluates a substring, while
151 evaluates a regular expression.
155 is a regular expression, it
156 is evaluated case-insensitively.
157 Has no effect on substring terms.
163 to consist of an opaque keyword.
165 Results are sorted by manual title, with output formatted as
167 .D1 title(sec) \- description
171 is the manual's title (note multiple manual names may exist for one
174 is the manual section, and
176 is the manual's short description.
177 If an architecture is specified for the manual, it is displayed as
179 .D1 title(cat/arch) \- description
181 Resulting manuals may be accessed as
183 .Dl $ man \-s sec title
185 If an architecture is specified in the output, use
187 .Dl $ man \-s sec \-S arch title
189 Queries evaluate over a subset of
193 In addition to the macro keys listed below, the special key
195 may be used to match any available macro key.
197 Names and description:
198 .Bl -column "xLix" description -offset indent -compact
199 .It Li NAME Ta manual name in the NAME section, subset of \&Nm
200 .It Li \&Nm Ta manual name
201 .It Li \&Nd Ta one-line manual description
202 .It Li arch Ta machine architecture (case-insensitive)
203 .It Li sec Ta manual section number
206 Sections and cross references:
207 .Bl -column "xLix" description -offset indent -compact
208 .It Li \&Sh Ta section header (excluding standard sections)
209 .It Li \&Ss Ta subsection header
210 .It Li \&Xr Ta cross reference to another manual page
211 .It Li \&Rs Ta bibliographic reference
214 Semantic markup for command line utilities:
215 .Bl -column "xLix" description -offset indent -compact
216 .It Li \&Fl Ta command line options (flags)
217 .It Li \&Cm Ta command modifier
218 .It Li \&Ar Ta command argument
219 .It Li \&Ic Ta internal or interactive command
220 .It Li \&Ev Ta environmental variable
221 .It Li \&Pa Ta file system path
224 Semantic markup for function libraries:
225 .Bl -column "xLix" description -offset indent -compact
226 .It Li \&Lb Ta function library name
227 .It Li \&In Ta include file
228 .It Li \&Ft Ta function return type
229 .It Li \&Fn Ta function name
230 .It Li \&Fa Ta function argument type and name
231 .It Li \&Vt Ta variable type
232 .It Li \&Va Ta variable name
233 .It Li \&Dv Ta defined variable or preprocessor constant
234 .It Li \&Er Ta error constant
235 .It Li \&Ev Ta environmental variable
238 Various semantic markup:
239 .Bl -column "xLix" description -offset indent -compact
240 .It Li \&An Ta author name
241 .It Li \&Lk Ta hyperlink
242 .It Li \&Mt Ta Do mailto Dc hyperlink
243 .It Li \&Cd Ta kernel configuration declaration
244 .It Li \&Ms Ta mathematical symbol
245 .It Li \&Tn Ta tradename
249 .Bl -column "xLix" description -offset indent -compact
250 .It Li \&Em Ta italic font or underline
251 .It Li \&Sy Ta boldface font
252 .It Li \&Li Ta typewriter font
256 .Bl -column "xLix" description -offset indent -compact
257 .It Li \&St Ta reference to a standards document
258 .It Li \&At Ta At No version reference
259 .It Li \&Bx Ta Bx No version reference
260 .It Li \&Bsx Ta Bsx No version reference
261 .It Li \&Nx Ta Nx No version reference
262 .It Li \&Fx Ta Fx No version reference
263 .It Li \&Ox Ta Ox No version reference
264 .It Li \&Dx Ta Dx No version reference
267 .Bl -tag -width MANPATH
269 The standard search path used by
271 may be changed by specifying a path in the
273 environment variable.
274 Invalid paths, or paths without manual databases, are ignored.
279 begins with a colon, it is appended to the default list;
280 if it ends with a colon, it is prepended to the default list;
281 or if it contains two adjacent colons,
282 the standard search path is inserted between the colons.
283 If none of these conditions are met, it overrides the
284 standard search path.
287 .Bl -tag -width "/etc/man.conf" -compact
302 as a substring of manual names and descriptions:
312 .Dl $ apropos .cf .cnf .conf
314 Search in names and descriptions using a regular expression:
316 .Dl $ apropos '~set.?[ug]id'
318 Search for manuals in the library category mentioning both the
324 .Dl $ apropos \-s 3 Va=optind \-a Va=optarg
326 Do exactly the same as calling
331 .Dl $ apropos \-\- \-i 'Nm~[[:<:]]ssh[[:>:]]'
333 The following two invocations are equivalent:
335 .D1 Li $ apropos -S Ar arch Li -s Ar section expression
336 .Bd -ragged -offset indent
337 .Li $ apropos \e( Ar expression Li \e)
338 .Li -a arch~^( Ns Ar arch Ns Li |any)$
339 .Li -a sec~^ Ns Ar section Ns Li $
348 utility first appeared in
350 It was rewritten from scratch for
357 variable first appeared in
378 The current version was written by
379 .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
381 .An Ingo Schwarze Aq Mt schwarze@openbsd.org .