Deleted Added
full compact
apropos.1 (274880) apropos.1 (275432)
1.\" $Id: apropos.1,v 1.29 2014/04/24 00:28:19 schwarze Exp $
1.\" $Id: apropos.1,v 1.36 2014/10/25 01:03:52 schwarze Exp $
2.\"
3.\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
4.\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
5.\"
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.
9.\"
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.
17.\"
2.\"
3.\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
4.\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
5.\"
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.
9.\"
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.
17.\"
18.Dd $Mdocdate: April 24 2014 $
18.Dd $Mdocdate: October 25 2014 $
19.Dt APROPOS 1
20.Os
21.Sh NAME
22.Nm apropos ,
23.Nm whatis
24.Nd search manual page databases
25.Sh SYNOPSIS
26.Nm
19.Dt APROPOS 1
20.Os
21.Sh NAME
22.Nm apropos ,
23.Nm whatis
24.Nd search manual page databases
25.Sh SYNOPSIS
26.Nm
27.Op Fl acfhklVw
27.Op Fl C Ar file
28.Op Fl M Ar path
29.Op Fl m Ar path
30.Op Fl O Ar outkey
31.Op Fl S Ar arch
32.Op Fl s Ar section
33.Ar expression ...
34.Sh DESCRIPTION
35The
36.Nm apropos
37and
38.Nm whatis
39utilities query manual page databases generated by
40.Xr makewhatis 8 ,
41evaluating
42.Ar expression
43for each file in each database.
28.Op Fl C Ar file
29.Op Fl M Ar path
30.Op Fl m Ar path
31.Op Fl O Ar outkey
32.Op Fl S Ar arch
33.Op Fl s Ar section
34.Ar expression ...
35.Sh DESCRIPTION
36The
37.Nm apropos
38and
39.Nm whatis
40utilities query manual page databases generated by
41.Xr makewhatis 8 ,
42evaluating
43.Ar expression
44for each file in each database.
44By default, it displays the names, section numbers, and description lines
45By default, they display the names, section numbers, and description lines
45of all matching manuals.
46.Pp
47By default,
48.Nm
49searches for
50.Xr makewhatis 8
51databases in the default paths stipulated by
52.Xr man 1
53and uses case-insensitive substring matching
54.Pq the Cm = No operator
55over manual names and descriptions
56.Pq the Li \&Nm No and Li \&Nd No macro keys .
57Multiple terms imply pairwise
58.Fl o .
46of all matching manuals.
47.Pp
48By default,
49.Nm
50searches for
51.Xr makewhatis 8
52databases in the default paths stipulated by
53.Xr man 1
54and uses case-insensitive substring matching
55.Pq the Cm = No operator
56over manual names and descriptions
57.Pq the Li \&Nm No and Li \&Nd No macro keys .
58Multiple terms imply pairwise
59.Fl o .
60.Pp
59.Nm whatis
61.Nm whatis
60maps terms only to case-sensitive manual names.
62is a synonym for
63.Nm
64.Fl f .
61.Pp
65.Pp
62Its arguments are as follows:
66The options are as follows:
63.Bl -tag -width Ds
67.Bl -tag -width Ds
68.It Fl a
69Instead of showing only the title lines, show the complete manual pages,
70just like
71.Xr man 1
72.Fl a
73would.
74If the standard output is a terminal device and
75.Fl c
76is not specified, use
77.Xr more 1
78to paginate them.
79In
80.Fl a
81mode, the options
82.Fl IKOTW
83described in the
84.Xr mandoc 1
85manual are also available.
64.It Fl C Ar file
65Specify an alternative configuration
66.Ar file
67in
68.Xr man.conf 5
69format.
86.It Fl C Ar file
87Specify an alternative configuration
88.Ar file
89in
90.Xr man.conf 5
91format.
92.It Fl c
93In
94.Fl a
95mode, copy the formatted manual pages to the standard output without using
96.Xr more 1
97to paginate them.
98.It Fl f
99Search for all words in
100.Ar expression
101in manual page names only.
102The search is case insensitive and matches whole words only.
103In this mode, macro keys, comparison operators, and logical operators
104are not available.
105This overrides any earlier
106.Fl k
107and
108.Fl l
109options.
110.It Fl h
111Instead of showing the title lines, show the SYNOPSIS sections, just like
112.Xr man 1
113.Fl h
114would.
115.It Fl k
116Support the full
117.Ar expression
118syntax.
119This overrides any earlier
120.Fl f
121and
122.Fl l
123options.
124It is the default for
125.Nm .
126.It Fl l
127An alias for
128.Xr mandoc 1
129.Fl a .
130This overrides any earlier
131.Fl f ,
132.Fl k ,
133and
134.Fl w
135options.
70.It Fl M Ar path
71Use the colon-separated path instead of the default list of paths
72searched for
73.Xr makewhatis 8
74databases.
75Invalid paths, or paths without manual databases, are ignored.
76.It Fl m Ar path
77Prepend the colon-separated paths to the list of paths searched

--- 13 unchanged lines hidden (view full) ---

91is case insensitive.
92By default, pages for all architectures are shown.
93.It Fl s Ar section
94Restrict the search to the specified section of the manual.
95By default, pages from all sections are shown.
96See
97.Xr man 1
98for a listing of sections.
136.It Fl M Ar path
137Use the colon-separated path instead of the default list of paths
138searched for
139.Xr makewhatis 8
140databases.
141Invalid paths, or paths without manual databases, are ignored.
142.It Fl m Ar path
143Prepend the colon-separated paths to the list of paths searched

--- 13 unchanged lines hidden (view full) ---

157is case insensitive.
158By default, pages for all architectures are shown.
159.It Fl s Ar section
160Restrict the search to the specified section of the manual.
161By default, pages from all sections are shown.
162See
163.Xr man 1
164for a listing of sections.
165.It Fl V
166Print version and exit.
167.It Fl w
168Instead of showing title lines, show the pathnames of the matching
169manual pages, just like
170.Xr man 1
171.Fl w
172would.
99.El
100.Pp
101An
102.Ar expression
103consists of search terms joined by logical operators
104.Fl a
105.Pq and
106and

--- 53 unchanged lines hidden (view full) ---

160.It Fl i Ar term
161If
162.Ar term
163is a regular expression, it
164is evaluated case-insensitively.
165Has no effect on substring terms.
166.El
167.Pp
173.El
174.Pp
175An
176.Ar expression
177consists of search terms joined by logical operators
178.Fl a
179.Pq and
180and

--- 53 unchanged lines hidden (view full) ---

234.It Fl i Ar term
235If
236.Ar term
237is a regular expression, it
238is evaluated case-insensitively.
239Has no effect on substring terms.
240.El
241.Pp
168.Nm whatis
169considers an
170.Ar expression
171to consist of an opaque keyword.
172.Pp
173Results are sorted by manual sections and names, with output formatted as
174.Pp
175.D1 name[, name...](sec) \- description
176.Pp
177Where
178.Dq name
179is the manual's name,
180.Dq sec

--- 84 unchanged lines hidden (view full) ---

265.It Li \&Bx Ta Bx No version reference
266.It Li \&Bsx Ta Bsx No version reference
267.It Li \&Nx Ta Nx No version reference
268.It Li \&Fx Ta Fx No version reference
269.It Li \&Ox Ta Ox No version reference
270.It Li \&Dx Ta Dx No version reference
271.El
272.Sh ENVIRONMENT
242Results are sorted by manual sections and names, with output formatted as
243.Pp
244.D1 name[, name...](sec) \- description
245.Pp
246Where
247.Dq name
248is the manual's name,
249.Dq sec

--- 84 unchanged lines hidden (view full) ---

334.It Li \&Bx Ta Bx No version reference
335.It Li \&Bsx Ta Bsx No version reference
336.It Li \&Nx Ta Nx No version reference
337.It Li \&Fx Ta Fx No version reference
338.It Li \&Ox Ta Ox No version reference
339.It Li \&Dx Ta Dx No version reference
340.El
341.Sh ENVIRONMENT
273.Bl -tag -width MANPATH
342.Bl -tag -width MANPAGER
343.It Ev MANPAGER
344Any non-empty value of the environment variable
345.Ev MANPAGER
346will be used instead of the standard pagination program,
347.Xr more 1 .
274.It Ev MANPATH
275The standard search path used by
276.Xr man 1
277may be changed by specifying a path in the
278.Ev MANPATH
279environment variable.
280Invalid paths, or paths without manual databases, are ignored.
281Overridden by
282.Fl M .
283If
284.Ev MANPATH
285begins with a colon, it is appended to the default list;
286if it ends with a colon, it is prepended to the default list;
287or if it contains two adjacent colons,
288the standard search path is inserted between the colons.
289If none of these conditions are met, it overrides the
290standard search path.
348.It Ev MANPATH
349The standard search path used by
350.Xr man 1
351may be changed by specifying a path in the
352.Ev MANPATH
353environment variable.
354Invalid paths, or paths without manual databases, are ignored.
355Overridden by
356.Fl M .
357If
358.Ev MANPATH
359begins with a colon, it is appended to the default list;
360if it ends with a colon, it is prepended to the default list;
361or if it contains two adjacent colons,
362the standard search path is inserted between the colons.
363If none of these conditions are met, it overrides the
364standard search path.
365.It Ev PAGER
366Specifies the pagination program to use when
367.Ev MANPAGER
368is not defined.
369If neither PAGER nor MANPAGER is defined,
370.Pa /usr/bin/more Fl s
371will be used.
291.El
292.Sh FILES
293.Bl -tag -width "/etc/man.conf" -compact
294.It Pa mandoc.db
295name of the
296.Xr makewhatis 8
297keyword database
298.It Pa /etc/man.conf

--- 45 unchanged lines hidden (view full) ---

344.Li -a arch~^( Ns Ar arch Ns Li |any)$
345.Li -a sec~^ Ns Ar section Ns Li $
346.Ed
347.Sh SEE ALSO
348.Xr man 1 ,
349.Xr re_format 7 ,
350.Xr makewhatis 8
351.Sh HISTORY
372.El
373.Sh FILES
374.Bl -tag -width "/etc/man.conf" -compact
375.It Pa mandoc.db
376name of the
377.Xr makewhatis 8
378keyword database
379.It Pa /etc/man.conf

--- 45 unchanged lines hidden (view full) ---

425.Li -a arch~^( Ns Ar arch Ns Li |any)$
426.Li -a sec~^ Ns Ar section Ns Li $
427.Ed
428.Sh SEE ALSO
429.Xr man 1 ,
430.Xr re_format 7 ,
431.Xr makewhatis 8
432.Sh HISTORY
352An
433Part of the functionality of
434.Nm whatis
435was already provided by the former
436.Nm manwhere
437utility in
438.Bx 1 .
439The
353.Nm
440.Nm
354utility first appeared in
441and
442.Nm whatis
443utilities first appeared in
355.Bx 2 .
444.Bx 2 .
356It was rewritten from scratch for
445They were rewritten from scratch for
357.Ox 5.6 .
358.Pp
359The
360.Fl M
361option and the
362.Ev MANPATH
363variable first appeared in
364.Bx 4.3 ;
365.Fl m
366in
367.Bx 4.3 Reno ;
368.Fl C
369in
370.Bx 4.4 Lite1 ;
371and
372.Fl S
373and
374.Fl s
375in
446.Ox 5.6 .
447.Pp
448The
449.Fl M
450option and the
451.Ev MANPATH
452variable first appeared in
453.Bx 4.3 ;
454.Fl m
455in
456.Bx 4.3 Reno ;
457.Fl C
458in
459.Bx 4.4 Lite1 ;
460and
461.Fl S
462and
463.Fl s
464in
376.Ox 4.5 .
465.Ox 4.5
466for
467.Nm
468and in
469.Ox 5.6
470for
471.Nm whatis .
377.Sh AUTHORS
378.An -nosplit
379.An Bill Joy
472.Sh AUTHORS
473.An -nosplit
474.An Bill Joy
380wrote the original
475wrote
476.Nm manwhere
477in 1977 and the original
381.Bx
382.Nm
478.Bx
479.Nm
480and
481.Nm whatis
383in February 1979.
384The current version was written by
385.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
386and
387.An Ingo Schwarze Aq Mt schwarze@openbsd.org .
482in February 1979.
483The current version was written by
484.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
485and
486.An Ingo Schwarze Aq Mt schwarze@openbsd.org .