aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apropos.1
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-11-20 15:43:14 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-11-20 15:43:14 +0000
commit8adeb23f44e116bab3711839074b351405efed4b (patch)
treeaaa0521e6817794b478931ba176543deadc410fb /apropos.1
parent9dee7d2c72dbac8c35da910fd415a2555e83b8ea (diff)
downloadmandoc-8adeb23f44e116bab3711839074b351405efed4b.tar.gz
mandoc-8adeb23f44e116bab3711839074b351405efed4b.tar.zst
mandoc-8adeb23f44e116bab3711839074b351405efed4b.zip
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.
Diffstat (limited to 'apropos.1')
-rw-r--r--apropos.119
1 files changed, 14 insertions, 5 deletions
diff --git a/apropos.1 b/apropos.1
index 850d06a8..027ea3f7 100644
--- a/apropos.1
+++ b/apropos.1
@@ -1,4 +1,4 @@
-.\" $Id: apropos.1,v 1.4 2011/11/18 07:02:19 kristaps Exp $
+.\" $Id: apropos.1,v 1.5 2011/11/20 15:43:14 kristaps Exp $
.\"
.\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
@@ -14,27 +14,33 @@
.\" 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 18 2011 $
+.Dd $Mdocdate: November 20 2011 $
.Dt APROPOS 1
.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