1 .\" $Id: apropos.1,v 1.15 2011/12/25 16:53:51 schwarze 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: December 25 2011 $
22 .Nd search manual page databases
34 utility queries manual page databases generated by
38 for each file in each database.
39 Its arguments are as follows:
42 Specify an alternative configuration
48 Use the colon-separated path instead of the default list of paths
52 Invalid paths, or paths without manual databases, are ignored.
54 Prepend the colon-separated paths to the list of paths searched
58 Invalid paths, or paths without manual databases, are ignored.
60 Search only for a particular architecture.
62 Search only for a manual section.
65 for a listing of manual sections.
70 consists of search terms joined by logical operators
78 operator has precedence over
80 and both are evaluated left-to-right.
82 .It \&( Ar expr No \&)
83 True if the subexpression
86 .It Ar expr1 Fl a Ar expr2
93 .It Ar expr1 Oo Fl o Oc Ar expr2
98 evaluate to true (logical
105 .Li [key[,key]*(=~)]?val ,
115 for a list of available keys.
118 evaluates a substring, while
120 evaluates a regular expression.
124 is a regular expression, it
125 is evaluated case-insensitively.
126 Has no effect on substring terms.
133 databases in the default paths stipulated by
135 parses terms as case-sensitive regular expressions
136 .Pq the Li \&~ operator
137 over manual names and descriptions
138 .Pq the Li \&Nm No and Li \&Nd No macro keys .
139 Multiple terms imply pairwise
141 Results are sorted by manual title, with output formatted as
143 .D1 title(sec) \- description
147 is the manual's title (note multiple manual names may exist for one
150 is the manual section, and
152 is the manual's short description.
153 If an architecture is specified for the manual, it is displayed as
155 .D1 title(cat/arch) \- description
157 Resulting manuals may be accessed as
159 .Dl $ man \-s sec title
161 If an architecture is specified in the output, use
163 .Dl $ man \-s sec \-S arch title
165 Queries evaluate over a subset of
169 In addition to the macro keys listed below, the special key
171 may be used to match any available macro key.
173 Names and description:
174 .Bl -column "xLix" description -offset indent -compact
175 .It Li \&Nm Ta manual name
176 .It Li \&Nd Ta one-line manual description
179 Sections and cross references:
180 .Bl -column "xLix" description -offset indent -compact
181 .It Li \&Sh Ta section header (excluding standard sections)
182 .It Li \&Ss Ta subsection header
183 .It Li \&Xr Ta cross reference to another manual page
184 .It Li \&Rs Ta bibliographic reference
187 Semantic markup for command line utilities:
188 .Bl -column "xLix" description -offset indent -compact
189 .It Li \&Fl Ta command line options (flags)
190 .It Li \&Cm Ta command modifier
191 .It Li \&Ar Ta command argument
192 .It Li \&Ic Ta internal or interactive command
193 .It Li \&Ev Ta environmental variable
194 .It Li \&Pa Ta file system path
197 Semantic markup for function libraries:
198 .Bl -column "xLix" description -offset indent -compact
199 .It Li \&Lb Ta function library name
200 .It Li \&In Ta include file
201 .It Li \&Ft Ta function return type
202 .It Li \&Fn Ta function name
203 .It Li \&Fa Ta function argument type and name
204 .It Li \&Vt Ta variable type
205 .It Li \&Va Ta variable name
206 .It Li \&Dv Ta defined variable or preprocessor constant
207 .It Li \&Er Ta error constant
208 .It Li \&Ev Ta environmental variable
211 Various semantic markup:
212 .Bl -column "xLix" description -offset indent -compact
213 .It Li \&An Ta author name
214 .It Li \&Lk Ta hyperlink
215 .It Li \&Mt Ta Do mailto Dc hyperlink
216 .It Li \&Cd Ta kernel configuration declaration
217 .It Li \&Ms Ta mathematical symbol
218 .It Li \&Tn Ta tradename
222 .Bl -column "xLix" description -offset indent -compact
223 .It Li \&Em Ta italic font or underline
224 .It Li \&Sy Ta boldface font
225 .It Li \&Li Ta typewriter font
229 .Bl -column "xLix" description -offset indent -compact
230 .It Li \&St Ta reference to a standards document
231 .It Li \&At Ta At No version reference
232 .It Li \&Bx Ta Bx No version reference
233 .It Li \&Bsx Ta Bsx No version reference
234 .It Li \&Nx Ta Nx No version reference
235 .It Li \&Fx Ta Fx No version reference
236 .It Li \&Ox Ta Ox No version reference
237 .It Li \&Dx Ta Dx No version reference
242 Colon-separated paths modifying the default list of paths searched for
244 Invalid paths, or paths without manual databases, are ignored.
251 it is appended to the default list;
254 it is prepended to the default list; else if it contains
256 the default list is inserted between the colons.
257 If none of these conditions are met, it overrides the default list.
260 .Bl -tag -width "/etc/man.conf" -compact
279 as a substring and regular expression
280 within each manual name and description:
283 .Dl $ apropos ~^mdoc$
289 for the regular expression case:
291 .Dl $ apropos ~^mdoc$ roff man
292 .Dl $ apropos ~^mdoc$ \-o roff \-o man
298 as variable names in the library category:
300 .Dl $ apropos \-s 3 Va~^optind \-a Va~^optarg$
308 utility was written by
309 .An Kristaps Dzonsons ,
310 .Mt kristaps@bsd.lv .