aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apropos.1
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-11-20 16:29:50 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-11-20 16:29:50 +0000
commit06acc5d53500a0a7feb20e948d2a07950d0b4bad (patch)
tree0fb899aff7cdbc2cd09c716b7854dc2749fb04a8 /apropos.1
parent28e2cf1e5beb4674637a8c3f7f0b0908f817e325 (diff)
downloadmandoc-06acc5d53500a0a7feb20e948d2a07950d0b4bad.tar.gz
mandoc-06acc5d53500a0a7feb20e948d2a07950d0b4bad.tar.zst
mandoc-06acc5d53500a0a7feb20e948d2a07950d0b4bad.zip
Clarify some behaviour, bringing schwarze@'s patch and mine closer together
(although I still don't have -M, which is a big piece). First, the default search path is the cwd. This will change to use -M once I look over that code. If MANPATH is specified, this replaces the cwd. Both of these are augmented by -m. If paths don't exist or don't have databases, they're silently ignored. This makes perfect sense: you may be given a superset of possible paths. The corner case of no paths (where, say, MANPATH consists of bogus paths or the cwd is unreadable) simply means that no paths are searched.
Diffstat (limited to 'apropos.1')
-rw-r--r--apropos.132
1 files changed, 12 insertions, 20 deletions
diff --git a/apropos.1 b/apropos.1
index 027ea3f7..3b5c7632 100644
--- a/apropos.1
+++ b/apropos.1
@@ -1,4 +1,4 @@
-.\" $Id: apropos.1,v 1.5 2011/11/20 15:43:14 kristaps Exp $
+.\" $Id: apropos.1,v 1.6 2011/11/20 16:29:50 kristaps Exp $
.\"
.\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
@@ -37,10 +37,11 @@ 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
+Append the colon-separated paths to the default 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
@@ -111,7 +112,7 @@ is evaluated case-insensitively.
.Pp
By default,
.Nm
-searches for
+searches for a
.Xr mandocdb 8
database in the current working directory and
parses terms as case-sensitive regular expressions
@@ -143,12 +144,13 @@ 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.
+.El
.\" .Sh FILES
.Sh EXIT STATUS
.Ex -std
@@ -182,23 +184,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.