=================================================================== RCS file: /cvs/mandoc/apropos.1,v retrieving revision 1.5 retrieving revision 1.8 diff -u -p -r1.5 -r1.8 --- mandoc/apropos.1 2011/11/20 15:43:14 1.5 +++ mandoc/apropos.1 2011/11/23 10:09:30 1.8 @@ -1,4 +1,4 @@ -.\" $Id: apropos.1,v 1.5 2011/11/20 15:43:14 kristaps Exp $ +.\" $Id: apropos.1,v 1.8 2011/11/23 10:09:30 kristaps Exp $ .\" .\" Copyright (c) 2011 Kristaps Dzonsons .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 20 2011 $ +.Dd $Mdocdate: November 23 2011 $ .Dt APROPOS 1 .Os .Sh NAME @@ -22,6 +22,7 @@ .Nd search manual page databases .Sh SYNOPSIS .Nm +.Op Fl M Ar manpath .Op Fl m Ar manpath .Op Fl S Ar arch .Op Fl s Ar section @@ -30,17 +31,24 @@ The .Nm utility queries manual page databases generated by -.Xr mandocdb 8 , +.Xr mandocdb 8 , evaluating on .Ar expression for each file in each database. Its arguments are as follows: .Bl -tag -width Ds +.It Fl M Ar manpath +Use the colon-separated path instead of the default list of paths +searched for +.Xr mandocdb 8 +databases. +Invalid paths, or paths without manual databases, are ignored. .It Fl m Ar manpath -A colon-separated list of paths containing +Append the colon-separated paths to the list of paths searched +for .Xr mandocdb 8 databases. -Paths may be relative or absolute. +Invalid paths, or paths without manual databases, are ignored. .It Fl S Ar arch Search only for a particular architecture. .It Fl s Ar cat @@ -63,7 +71,6 @@ The operator has precedence over .Fl o and both are evaluated left-to-right. -.Pp .Bl -tag -width Ds .It \&( Ar expr No \&) True if the subexpression @@ -113,7 +120,8 @@ By default, .Nm searches for .Xr mandocdb 8 -database in the current working directory and +databases in the default paths stipulated by +.Xr man 1 , parses terms as case-sensitive regular expressions .Pq the Li \&~ operator over manual names and descriptions @@ -143,12 +151,15 @@ Resulting manuals may be accessed as If an architecture is specified in the output, use .Pp .Dl $ man \-s sec \-S arch title -.\" .Sh IMPLEMENTATION NOTES -.\" Not used in OpenBSD. -.\" .Sh RETURN VALUES -.\" For sections 2, 3, & 9 only. -.\" .Sh ENVIRONMENT -.\" For sections 1, 6, 7, & 8 only. +.Sh ENVIRONMENT +.Bl -tag -width Ds +.It Ev MANPATH +Comma-separated paths overriding the default list of paths searched for +manual databases. +Invalid paths, or paths without manual databases, are ignored. +Takes precedence over +.Fl M . +.El .\" .Sh FILES .Sh EXIT STATUS .Ex -std @@ -182,23 +193,13 @@ Search for all manuals referencing in any letter case: .Pp .Dl $ apropos \-\- \-i posix -.\" .Sh DIAGNOSTICS -.\" For sections 1, 4, 6, 7, & 8 only. -.\" .Sh ERRORS -.\" For sections 2, 3, & 9 only. .Sh SEE ALSO .Xr man 1 , .Xr mandoc 1 , .Xr re_format 7 -.\" .Sh STANDARDS -.\" .Sh HISTORY .Sh AUTHORS The .Nm utility was written by .An Kristaps Dzonsons , .Mt kristaps@bsd.lv . -.\" .Sh CAVEATS -.\" .Sh BUGS -.\" .Sh SECURITY CONSIDERATIONS -.\" Not used in OpenBSD.