1 .\" $Id: apropos.1,v 1.23 2014/03/17 09:43:56 schwarze Exp $
3 .\" Copyright (c) 2011, 2012 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: March 17 2014 $
23 .Nd search manual page databases
37 utilities query manual page databases generated by
41 for each file in each database.
47 databases in the default paths stipulated by
49 parses terms as case-sensitive regular expressions
50 .Pq the Li \&~ operator
51 over manual names and descriptions
52 .Pq the Li \&Nm No and Li \&Nd No macro keys .
53 Multiple terms imply pairwise
56 maps terms only to case-sensitive manual names.
58 Its arguments are as follows:
61 Specify an alternative configuration
67 Use the colon-separated path instead of the default list of paths
71 Invalid paths, or paths without manual databases, are ignored.
73 Prepend the colon-separated paths to the list of paths searched
77 Invalid paths, or paths without manual databases, are ignored.
79 Restrict the search to pages for the specified
84 By default, pages for all architectures are shown.
86 Restrict the search to the specified section of the manual.
87 By default, pages from all sections are shown.
90 for a listing of sections.
95 consists of search terms joined by logical operators
103 operator has precedence over
105 and both are evaluated left-to-right.
107 .It \&( Ar expr No \&)
108 True if the subexpression
111 .It Ar expr1 Fl a Ar expr2
118 .It Ar expr1 Oo Fl o Oc Ar expr2
123 evaluate to true (logical
130 .Li [key[,key]*(=~)]?val ,
140 for a list of available keys.
143 evaluates a substring, while
145 evaluates a regular expression.
149 is a regular expression, it
150 is evaluated case-insensitively.
151 Has no effect on substring terms.
157 to consist of an opaque keyword.
159 Results are sorted by manual title, with output formatted as
161 .D1 title(sec) \- description
165 is the manual's title (note multiple manual names may exist for one
168 is the manual section, and
170 is the manual's short description.
171 If an architecture is specified for the manual, it is displayed as
173 .D1 title(cat/arch) \- description
175 Resulting manuals may be accessed as
177 .Dl $ man \-s sec title
179 If an architecture is specified in the output, use
181 .Dl $ man \-s sec \-S arch title
183 Queries evaluate over a subset of
187 In addition to the macro keys listed below, the special key
189 may be used to match any available macro key.
191 Names and description:
192 .Bl -column "xLix" description -offset indent -compact
193 .It Li \&Nm Ta manual name
194 .It Li \&Nd Ta one-line manual description
197 Sections and cross references:
198 .Bl -column "xLix" description -offset indent -compact
199 .It Li \&Sh Ta section header (excluding standard sections)
200 .It Li \&Ss Ta subsection header
201 .It Li \&Xr Ta cross reference to another manual page
202 .It Li \&Rs Ta bibliographic reference
205 Semantic markup for command line utilities:
206 .Bl -column "xLix" description -offset indent -compact
207 .It Li \&Fl Ta command line options (flags)
208 .It Li \&Cm Ta command modifier
209 .It Li \&Ar Ta command argument
210 .It Li \&Ic Ta internal or interactive command
211 .It Li \&Ev Ta environmental variable
212 .It Li \&Pa Ta file system path
215 Semantic markup for function libraries:
216 .Bl -column "xLix" description -offset indent -compact
217 .It Li \&Lb Ta function library name
218 .It Li \&In Ta include file
219 .It Li \&Ft Ta function return type
220 .It Li \&Fn Ta function name
221 .It Li \&Fa Ta function argument type and name
222 .It Li \&Vt Ta variable type
223 .It Li \&Va Ta variable name
224 .It Li \&Dv Ta defined variable or preprocessor constant
225 .It Li \&Er Ta error constant
226 .It Li \&Ev Ta environmental variable
229 Various semantic markup:
230 .Bl -column "xLix" description -offset indent -compact
231 .It Li \&An Ta author name
232 .It Li \&Lk Ta hyperlink
233 .It Li \&Mt Ta Do mailto Dc hyperlink
234 .It Li \&Cd Ta kernel configuration declaration
235 .It Li \&Ms Ta mathematical symbol
236 .It Li \&Tn Ta tradename
240 .Bl -column "xLix" description -offset indent -compact
241 .It Li \&Em Ta italic font or underline
242 .It Li \&Sy Ta boldface font
243 .It Li \&Li Ta typewriter font
247 .Bl -column "xLix" description -offset indent -compact
248 .It Li \&St Ta reference to a standards document
249 .It Li \&At Ta At No version reference
250 .It Li \&Bx Ta Bx No version reference
251 .It Li \&Bsx Ta Bsx No version reference
252 .It Li \&Nx Ta Nx No version reference
253 .It Li \&Fx Ta Fx No version reference
254 .It Li \&Ox Ta Ox No version reference
255 .It Li \&Dx Ta Dx No version reference
258 .Bl -tag -width MANPATH
260 The standard search path used by
262 may be changed by specifying a path in the
264 environment variable.
265 Invalid paths, or paths without manual databases, are ignored.
270 begins with a colon, it is appended to the default list;
271 if it ends with a colon, it is prepended to the default list;
272 or if it contains two adjacent colons,
273 the standard search path is inserted between the colons.
274 If none of these conditions are met, it overrides the
275 standard search path.
278 .Bl -tag -width "/etc/man.conf" -compact
293 as a substring of manual names and descriptions:
303 .Dl $ apropos .cf .cnf .conf
305 Search in names and descriptions using a regular expression:
307 .Dl $ apropos '~set.?[ug]id'
309 Search for manuals in the library category mentioning both the
315 .Dl $ apropos \-s 3 Va=optind \-a Va=optarg
317 Do exactly the same as calling
322 .Dl $ apropos \-\- \-i 'Nm~[[:<:]]ssh[[:>:]]'
330 utility first appeared in
332 It was rewritten from scratch for
339 variable first appeared in
360 The current version was written by
361 .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .