summaryrefslogtreecommitdiffstats
path: root/mandoc.1
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-09-03 05:22:45 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-09-03 05:22:45 +0000
commit23314f00a3de516604e28d2a34bde0428f6067fb (patch)
tree41f72d0cdd36e6f74d193974466fff1871fa7967 /mandoc.1
parent3d35e7c87bf69138c20259187b52c26c01ab6cda (diff)
downloadmandoc-23314f00a3de516604e28d2a34bde0428f6067fb.tar.gz
Implement the traditional -h option for man(1): show the SYNOPSIS only.
As usual, we get mandoc -h and apropos -h for free. Try stuff like "apropos -h In=dirent" or "apropos -h Fa=timespec". Only useful for terminal output, so -Tps, -Tpdf, -Thtml ignore -h for now.
Diffstat (limited to 'mandoc.1')
-rw-r--r--mandoc.16
1 files changed, 5 insertions, 1 deletions
diff --git a/mandoc.1 b/mandoc.1
index 495043a2..063ea13f 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -23,7 +23,7 @@
.Nd format and display UNIX manuals
.Sh SYNOPSIS
.Nm mandoc
-.Op Fl acfklV
+.Op Fl acfhklV
.Sm off
.Op Fl I Cm os Li = Ar name
.Sm on
@@ -85,6 +85,10 @@ for the
.Xr mdoc 7
.Sq \&Os
macro.
+.It Fl h
+Display only the SYNOPSIS lines.
+Implies
+.Fl a .
.It Fl k
A synonym for
.Xr apropos 1 .