summaryrefslogtreecommitdiffstats
path: root/mandoc.1
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-30 18:08:10 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-30 18:08:10 +0000
commit24387bf29bff146c16b4c293b9c384cb99730d62 (patch)
treeb30029cd4ba65d447185793fa6821d81fc364d6e /mandoc.1
parent3c2c418ed925503520d69d3b17650956b2324143 (diff)
downloadmandoc-24387bf29bff146c16b4c293b9c384cb99730d62.tar.gz
Introduce a man(1) -l option as an alias for mandoc -a.
Basically, this does the same as man -l in Linux man-db. The point is that now all functionality of the combined tool is reachable from the man(1) command name: apropos = man -k, whatis = man -f, mandoc = man -cl. Originally suggested by Carsten dot Kunze at arcor dot de, current maintainer of the Heirloom Documentation Tools. While here, add various missing information to the usage() and to the manuals.
Diffstat (limited to 'mandoc.1')
-rw-r--r--mandoc.140
1 files changed, 38 insertions, 2 deletions
diff --git a/mandoc.1 b/mandoc.1
index 157e4bea..495043a2 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -23,7 +23,7 @@
.Nd format and display UNIX manuals
.Sh SYNOPSIS
.Nm mandoc
-.Op Fl acV
+.Op Fl acfklV
.Sm off
.Op Fl I Cm os Li = Ar name
.Sm on
@@ -51,7 +51,7 @@ and produces
.Fl T Ns Cm ascii
output.
.Pp
-The arguments are as follows:
+The options are as follows:
.Bl -tag -width Ds
.It Fl a
If the standard output is a terminal device and
@@ -68,6 +68,14 @@ to paginate them.
This is the default.
It can be specified to override
.Fl a .
+.It Fl f
+A synonym for
+.Xr whatis 1 .
+This overrides any earlier
+.Fl k
+and
+.Fl l
+options.
.Sm off
.It Fl I Cm os Li = Ar name
.Sm on
@@ -77,6 +85,22 @@ for the
.Xr mdoc 7
.Sq \&Os
macro.
+.It Fl k
+A synonym for
+.Xr apropos 1 .
+This overrides any earlier
+.Fl f
+and
+.Fl l
+options.
+.It Fl l
+A synonym for
+.Fl a .
+Also reverts any earlier
+.Fl f
+and
+.Fl k
+options.
.It Fl m Ns Ar format
Input format.
See
@@ -137,6 +161,18 @@ If multiple files are specified,
.Nm
will halt with the first failed parse.
.El
+.Pp
+In
+.Fl f
+and
+.Fl k
+mode,
+.Nm
+also supports the options
+.Fl CMmOSsw
+described in the
+.Xr apropos 1
+manual.
.Ss Input Formats
The
.Nm