aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit90abf6007b8853890d1204e9249848383de26416 (patch)
tree15db8526d5923768c103b28a21a1fece79d6d9f9
parent022b8bdab4bc87d590cb930db853e246e42e46ae (diff)
downloadmandoc-90abf6007b8853890d1204e9249848383de26416.tar.gz
mandoc-90abf6007b8853890d1204e9249848383de26416.tar.zst
mandoc-90abf6007b8853890d1204e9249848383de26416.zip
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.c3
-rw-r--r--man.18
-rw-r--r--mandoc.16
3 files changed, 10 insertions, 7 deletions
diff --git a/main.c b/main.c
index e56b2dbc..af31a474 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.197 2014/11/11 02:10:04 schwarze Exp $ */
+/* $Id: main.c,v 1.198 2014/11/11 02:43:41 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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 0c88dbb9..0d26fd28 100644
--- a/man.1
+++ b/man.1
@@ -1,4 +1,4 @@
-.\" $Id: man.1,v 1.6 2014/10/25 01:03:52 schwarze Exp $
+.\" $Id: man.1,v 1.7 2014/11/11 02:43:41 schwarze Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
.\"
.\" @(#)man.1 8.2 (Berkeley) 1/2/94
.\"
-.Dd $Mdocdate: October 25 2014 $
+.Dd $Mdocdate: November 11 2014 $
.Dt MAN 1
.Os
.Sh NAME
@@ -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 19c90f6f..7fa54911 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.1,v 1.121 2014/10/30 17:14:59 schwarze Exp $
+.\" $Id: mandoc.1,v 1.122 2014/11/11 02:43:41 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: October 30 2014 $
+.Dd $Mdocdate: November 11 2014 $
.Dt MANDOC 1
.Os
.Sh NAME
@@ -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