diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-08-27 00:06:09 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-08-27 00:06:09 +0000 |
commit | 721c87ceac444bbf84f77847d3520fb55e983903 (patch) | |
tree | 355c480f8653a28384b1358d13aeaa7defa42fe3 /usr.bin/mandoc/mandoc.1 | |
parent | 2af7ec1bcd0a87929504e51dc0f922c6cb450903 (diff) |
Add an implementation of man(1) into the /usr/bin/mandoc binary and
provide a unified set of command line options for mandoc(1), man(1),
apropos(1), and whatis(1), each option doing the same for all four.
Not adding any completely new options, only extending exiting ones
from one tool to the others. New options are:
* apropos & whatis -acfkw (in the past, these were man(1) only)
* apropos & whatis -a -IOTW (in the past, mandoc(1) only)
* mandoc -ac (in the past, man(1) only)
* man -IOTW (in the past, mandoc(1) only)
Before we can decide whether or not we want to replace src/usr.bin/man
with this implementation, considerable bugfixing, testing, and
performance measurements are needed, which i'd rather do in the tree
than outside. Note that these bugs only affect the new man(1) mode,
existing mandoc(1), apropos(1), and whatis(1) is fine.
The new functionality in mandoc(1), apropos(1), and whatis(1)
is fully enabled. To play with the new man(1), you can try:
# mv /usr/bin/man /usr/bin/oman
# ln -s /usr/bin/mandoc /usr/bin/man
Positive feedback about the general direction from sthen@ and jmc@,
and deraadt@ is not against it.
Diffstat (limited to 'usr.bin/mandoc/mandoc.1')
-rw-r--r-- | usr.bin/mandoc/mandoc.1 | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mandoc.1 b/usr.bin/mandoc/mandoc.1 index b6a316bb420..e6a3cc75024 100644 --- a/usr.bin/mandoc/mandoc.1 +++ b/usr.bin/mandoc/mandoc.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mandoc.1,v 1.59 2014/08/08 16:25:15 schwarze Exp $ +.\" $OpenBSD: mandoc.1,v 1.60 2014/08/27 00:06:08 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2012, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -15,7 +15,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: August 8 2014 $ +.Dd $Mdocdate: August 27 2014 $ .Dt MANDOC 1 .Os .Sh NAME @@ -23,7 +23,7 @@ .Nd format and display UNIX manuals .Sh SYNOPSIS .Nm mandoc -.Op Fl V +.Op Fl acV .Sm off .Op Fl I Cm os Li = Ar name .Sm on @@ -53,6 +53,21 @@ output. .Pp The arguments are as follows: .Bl -tag -width Ds +.It Fl a +If the standard output is a terminal device and +.Fl c +is not specified, use +.Xr more 1 +to paginate the output, just like +.Xr man 1 +would. +.It Fl c +Copy the formatted manual pages to the standard output without using +.Xr more 1 +to paginate them. +This is the default. +It can be specified to override +.Fl a . .Sm off .It Fl I Cm os Li = Ar name .Sm on @@ -425,6 +440,21 @@ See .Sx HTML Output for details; beyond generating XHTML tags instead of HTML tags, these output modes are identical. +.Sh ENVIRONMENT +.Bl -tag -width MANPAGER +.It Ev MANPAGER +Any non-empty value of the environment variable +.Ev MANPAGER +will be used instead of the standard pagination program, +.Xr more 1 . +.It Ev PAGER +Specifies the pagination program to use when +.Ev MANPAGER +is not defined. +If neither PAGER nor MANPAGER is defined, +.Pa /usr/bin/more Fl s +will be used. +.El .Sh EXIT STATUS The .Nm |