1 .\" $Id: apropos.1,v 1.17 2012/03/24 01:46:25 kristaps 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 24 2012 $
22 .Nd search manual page databases
34 utility queries manual page databases generated by
38 for each file in each database.
44 databases in the default paths stipulated by
46 parses terms as case-sensitive regular expressions
47 over manual names and descriptions.
48 Multiple terms imply pairwise
50 If standard output is a TTY, a result may be selected from a list and
51 its manual displayed with the pager.
53 Its arguments are as follows:
56 Specify an alternative configuration
62 Use the colon-separated path instead of the default list of paths
66 Invalid paths, or paths without manual databases, are ignored.
68 Prepend the colon-separated paths to the list of paths searched
72 Invalid paths, or paths without manual databases, are ignored.
74 Search only for a particular architecture.
76 Search only for a manual section.
79 for a listing of manual sections.
84 consists of search terms joined by logical operators
92 operator has precedence over
94 and both are evaluated left-to-right.
96 .It \&( Ar expr No \&)
97 True if the subexpression
100 .It Ar expr1 Fl a Ar expr2
107 .It Ar expr1 Oo Fl o Oc Ar expr2
112 evaluate to true (logical
119 .Li [key[,key]*(=~)]?val ,
129 for a list of available keys.
132 evaluates a substring, while
134 evaluates a regular expression.
138 is a regular expression, it
139 is evaluated case-insensitively.
140 Has no effect on substring terms.
143 Results are sorted by manual title, with output formatted as
145 .D1 title(sec) \- description
149 is the manual's title (note multiple manual names may exist for one
152 is the manual section, and
154 is the manual's short description.
155 If an architecture is specified for the manual, it is displayed as
157 .D1 title(cat/arch) \- description
159 If on a TTY, results are prefixed with a numeric identifier.
161 .D1 [index] title(cat) \- description
163 One may choose a manual be entering the index at the prompt.
164 Valid choices are displayed using
170 Source pages are formatted with
172 preformatted pages with
175 Queries evaluate over a subset of
179 In addition to the macro keys listed below, the special key
181 may be used to match any available macro key.
183 Names and description:
184 .Bl -column "xLix" description -offset indent -compact
185 .It Li \&Nm Ta manual name
186 .It Li \&Nd Ta one-line manual description
189 Sections and cross references:
190 .Bl -column "xLix" description -offset indent -compact
191 .It Li \&Sh Ta section header (excluding standard sections)
192 .It Li \&Ss Ta subsection header
193 .It Li \&Xr Ta cross reference to another manual page
194 .It Li \&Rs Ta bibliographic reference
197 Semantic markup for command line utilities:
198 .Bl -column "xLix" description -offset indent -compact
199 .It Li \&Fl Ta command line options (flags)
200 .It Li \&Cm Ta command modifier
201 .It Li \&Ar Ta command argument
202 .It Li \&Ic Ta internal or interactive command
203 .It Li \&Ev Ta environmental variable
204 .It Li \&Pa Ta file system path
207 Semantic markup for function libraries:
208 .Bl -column "xLix" description -offset indent -compact
209 .It Li \&Lb Ta function library name
210 .It Li \&In Ta include file
211 .It Li \&Ft Ta function return type
212 .It Li \&Fn Ta function name
213 .It Li \&Fa Ta function argument type and name
214 .It Li \&Vt Ta variable type
215 .It Li \&Va Ta variable name
216 .It Li \&Dv Ta defined variable or preprocessor constant
217 .It Li \&Er Ta error constant
218 .It Li \&Ev Ta environmental variable
221 Various semantic markup:
222 .Bl -column "xLix" description -offset indent -compact
223 .It Li \&An Ta author name
224 .It Li \&Lk Ta hyperlink
225 .It Li \&Mt Ta Do mailto Dc hyperlink
226 .It Li \&Cd Ta kernel configuration declaration
227 .It Li \&Ms Ta mathematical symbol
228 .It Li \&Tn Ta tradename
232 .Bl -column "xLix" description -offset indent -compact
233 .It Li \&Em Ta italic font or underline
234 .It Li \&Sy Ta boldface font
235 .It Li \&Li Ta typewriter font
239 .Bl -column "xLix" description -offset indent -compact
240 .It Li \&St Ta reference to a standards document
241 .It Li \&At Ta At No version reference
242 .It Li \&Bx Ta Bx No version reference
243 .It Li \&Bsx Ta Bsx No version reference
244 .It Li \&Nx Ta Nx No version reference
245 .It Li \&Fx Ta Fx No version reference
246 .It Li \&Ox Ta Ox No version reference
247 .It Li \&Dx Ta Dx No version reference
252 Default pager for manuals.
253 If this is unset, falls back to
256 The second choice for a manual pager.
257 If this is unset, use
260 Colon-separated paths modifying the default list of paths searched for
262 Invalid paths, or paths without manual databases, are ignored.
269 it is appended to the default list;
272 it is prepended to the default list; else if it contains
274 the default list is inserted between the colons.
275 If none of these conditions are met, it overrides the default list.
278 .Bl -tag -width "/etc/man.conf" -compact
297 as a substring and regular expression
298 within each manual name and description:
301 .Dl $ apropos ~^mdoc$
307 for the regular expression case:
309 .Dl $ apropos ~^mdoc$ roff man
310 .Dl $ apropos ~^mdoc$ \-o roff \-o man
316 as variable names in the library category:
318 .Dl $ apropos \-s 3 Va~^optind \-a Va~^optarg$
326 utility was written by
327 .An Kristaps Dzonsons ,
328 .Mt kristaps@bsd.lv .