summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mandoc.1
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-11-22 11:30:16 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-11-22 11:30:16 +0000
commit2d2bcd1c55e5386734cf4093ed896e8b53a4e29e (patch)
treede8c15acc43c971686faaa1f1dab2a7eafa0bee0 /usr.bin/mandoc/mandoc.1
parent65ffacb450ff60dede5960f4185388d9c9b9a910 (diff)
In -T locale (the default), -T ascii, and -T utf8 mode, provide a new
output option -O tag[=term] to move right to the definition of "term" when opening the manual page in a pager, effectively porting the -T html fragment name feature - https://man.openbsd.org/ksh#ulimit - to the terminal. Try: $ man -O tag uvm_sysctl $ man -O tag=ulimit ksh $ man -O tag 3 compress Feature development triggered by a question from kn@. Klemens also tested, provided feedback that resulted in improvements, and provided an OK.
Diffstat (limited to 'usr.bin/mandoc/mandoc.1')
-rw-r--r--usr.bin/mandoc/mandoc.116
1 files changed, 14 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mandoc.1 b/usr.bin/mandoc/mandoc.1
index 24d3f33fc29..af46152384c 100644
--- a/usr.bin/mandoc/mandoc.1
+++ b/usr.bin/mandoc/mandoc.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mandoc.1,v 1.154 2018/10/02 14:56:36 schwarze Exp $
+.\" $OpenBSD: mandoc.1,v 1.155 2018/11/22 11:30:15 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2012, 2014-2018 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 2 2018 $
+.Dd $Mdocdate: November 22 2018 $
.Dt MANDOC 1
.Os
.Sh NAME
@@ -290,6 +290,18 @@ One useful application is for checking that
output formats in the same way as the
.Xr mdoc 7
source it was generated from.
+.It Cm tag Ns Op = Ns Ar term
+If the formatted manual page is opened in a pager,
+go to the definition of the
+.Ar term
+rather than showing the manual page from the beginning.
+If no
+.Ar term
+is specified, reuse the first command line argument that is not a
+.Ar section
+number.
+This is useful when it is the name of a manual page,
+in particular the name of a library function.
.It Cm width Ns = Ns Ar width
The output width is set to
.Ar width