=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/apropos.1,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- src/usr.bin/mandoc/apropos.1 2014/04/24 00:28:02 1.24 +++ src/usr.bin/mandoc/apropos.1 2014/08/27 00:06:08 1.25 @@ -1,6 +1,6 @@ -.\" $Id: apropos.1,v 1.24 2014/04/24 00:28:02 schwarze Exp $ +.\" $Id: apropos.1,v 1.25 2014/08/27 00:06:08 schwarze Exp $ .\" -.\" Copyright (c) 2011 Kristaps Dzonsons +.\" Copyright (c) 2011, 2012 Kristaps Dzonsons .\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -15,14 +15,16 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: April 24 2014 $ +.Dd $Mdocdate: August 27 2014 $ .Dt APROPOS 1 .Os .Sh NAME -.Nm apropos +.Nm apropos , +.Nm whatis .Nd search manual page databases .Sh SYNOPSIS .Nm +.Op Fl acfkw .Op Fl C Ar file .Op Fl M Ar path .Op Fl m Ar path @@ -32,13 +34,15 @@ .Ar expression ... .Sh DESCRIPTION The -.Nm -utility queries manual page databases generated by +.Nm apropos +and +.Nm whatis +utilities query manual page databases generated by .Xr makewhatis 8 , evaluating .Ar expression for each file in each database. -By default, it displays the names, section numbers, and description lines +By default, they display the names, section numbers, and description lines of all matching manuals. .Pp By default, @@ -54,14 +58,62 @@ Multiple terms imply pairwise .Fl o . .Pp -Its arguments are as follows: +.Nm whatis +is a synonym for +.Nm +.Fl f . +.Pp +The options are as follows: .Bl -tag -width Ds +.It Fl a +Instead of showing only the title lines, show the complete manual pages, +just like +.Xr man 1 +.Fl a +would. +If the standard output is a terminal device and +.Fl c +is not specified, use +.Xr more 1 +to paginate them. +In +.Fl a +mode, the options +.Fl IOTW +described in the +.Xr mandoc 1 +manual are also available. .It Fl C Ar file Specify an alternative configuration .Ar file in .Xr man.conf 5 format. +.It Fl c +In +.Fl a +mode, copy the formatted manual pages to the standard output without using +.Xr more 1 +to paginate them. +.It Fl f +Search for all words in +.Ar expression +in manual page names only. +The search is case insensitive and matches whole words only. +In this mode, macro keys, comparison operators, and logical operators +are not available. +This overrides any earlier +.Fl k +option. +.It Fl k +Support the full +.Ar expression +syntax. +This overrides any earlier +.Fl f +option. +It is the default for +.Nm . .It Fl M Ar path Use the colon-separated path instead of the default list of paths searched for @@ -91,6 +143,12 @@ See .Xr man 1 for a listing of sections. +.It Fl w +Instead of showing title lines, show the pathnames of the matching +manual pages, just like +.Xr man 1 +.Fl w +would. .El .Pp An @@ -260,7 +318,12 @@ .It Li \&Dx Ta Dx No version reference .El .Sh ENVIRONMENT -.Bl -tag -width MANPATH +.Bl -tag -width MANPAGER +.It Ev MANPAGER +Any non-empty value of the environment variable +.Ev MANPAGER +will be used instead of the standard pagination program, +.Xr more 1 . .It Ev MANPATH The standard search path used by .Xr man 1 @@ -278,6 +341,13 @@ the standard search path is inserted between the colons. If none of these conditions are met, it overrides the standard search path. +.It Ev PAGER +Specifies the pagination program to use when +.Ev MANPAGER +is not defined. +If neither PAGER nor MANPAGER is defined, +.Pa /usr/bin/more Fl s +will be used. .El .Sh FILES .Bl -tag -width "/etc/man.conf" -compact @@ -339,11 +409,19 @@ .Xr re_format 7 , .Xr makewhatis 8 .Sh HISTORY -An +Part of the functionality of +.Nm whatis +was already provided by the former +.Nm manwhere +utility in +.Bx 1 . +The .Nm -utility first appeared in +and +.Nm whatis +utilities first appeared in .Bx 2 . -It was rewritten from scratch for +They were rewritten from scratch for .Ox 5.6 . .Pp The @@ -363,13 +441,23 @@ and .Fl s in -.Ox 4.5 . +.Ox 4.5 +for +.Nm +and in +.Ox 5.6 +for +.Nm whatis . .Sh AUTHORS .An -nosplit .An Bill Joy -wrote the original +wrote +.Nm manwhere +in 1977 and the original .Bx .Nm +and +.Nm whatis in February 1979. The current version was written by .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv