From 8ff9b6d7b2b12cfb863578f68ec6572aa3f3d698 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sun, 20 Nov 2011 15:43:14 +0000 Subject: Integrate a moderately-patched version of schwarze@'s support for multiple directories containing mandocdb(8) databases. Some changes follow: (1) don't support -M yet; (2) fall back to cwd if no prior manpath has been specified; (3) resolve manpages using realpath() to prevent consecutive chdir()'s over relative paths; (4) note where further error-reporting is required; (5) fix leaking memory on exit in several cases. --- apropos.1 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'apropos.1') diff --git a/apropos.1 b/apropos.1 index 9de71454..839f22bb 100644 --- a/apropos.1 +++ b/apropos.1 @@ -19,22 +19,28 @@ .Os .Sh NAME .Nm apropos -.Nd search the manual page database +.Nd search manual page databases .Sh SYNOPSIS .Nm +.Op Fl m Ar manpath .Op Fl S Ar arch .Op Fl s Ar section .Ar expression... .Sh DESCRIPTION The .Nm -utility queries a manual page database generated by +utility queries manual page databases generated by .Xr mandocdb 8 , evaluating on .Ar expression -for each file in the database. +for each file in each database. Its arguments are as follows: .Bl -tag -width Ds +.It Fl m Ar manpath +A colon-separated list of paths containing +.Xr mandocdb 8 +databases. +Paths may be relative or absolute. .It Fl S Ar arch Search only for a particular architecture. .It Fl s Ar cat @@ -105,6 +111,9 @@ is evaluated case-insensitively. .Pp By default, .Nm +searches for +.Xr mandocdb 8 +database in the current working directory and parses terms as case-sensitive regular expressions .Pq the Li \&~ operator over manual names and descriptions -- cgit