summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-11-11 02:43:41 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-11-11 02:43:41 +0000
commit2c056fc7a8960253aa0b87c88175cd8cbe51af40 (patch)
treef24fe82d95db2b413e393c2527f46d2ba0bd68a4
parente0fc3d0e90dd77973545dc975682f7743e046e5e (diff)
downloadmandoc-2c056fc7a8960253aa0b87c88175cd8cbe51af40.tar.gz
Let -h imply -c (that is, not use the pager).
Usually, -h output is short, so the pager is just a nuisance. Also, traditional man(1) does not use a pager for -h. Triggered by a remark of deraadt@ on ICB.
-rw-r--r--main.c1
-rw-r--r--man.14
-rw-r--r--mandoc.12
3 files changed, 5 insertions, 2 deletions
diff --git a/main.c b/main.c
index de0e96fd..f9313f28 100644
--- a/main.c
+++ b/main.c
@@ -177,6 +177,7 @@ main(int argc, char *argv[])
case 'h':
(void)strlcat(curp.outopts, "synopsis,", BUFSIZ);
synopsis_only = 1;
+ use_pager = 0;
outmode = OUTMODE_ALL;
break;
case 'I':
diff --git a/man.1 b/man.1
index 4693d165..137dda50 100644
--- a/man.1
+++ b/man.1
@@ -98,7 +98,9 @@ options.
.It Fl h
Display only the SYNOPSIS lines of the requested manual pages.
Implies
-.Fl a .
+.Fl a
+and
+.Fl c .
.It Fl k
A synonym for
.Xr apropos 1 .
diff --git a/mandoc.1 b/mandoc.1
index 2db2b884..d86734fa 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -89,7 +89,7 @@ macro.
.It Fl h
Display only the SYNOPSIS lines.
Implies
-.Fl a .
+.Fl c .
.It Fl K Ns Ar encoding
Specify the input encoding.
The supported