aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.1
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-10-02 12:33:36 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-10-02 12:33:36 +0000
commitdfc72caad2158b1226363fe39e7bfa995ef68f78 (patch)
treeeb50cef13467679b333952697b5e1d3d599919d0 /mandoc.1
parent5c2a309a34544b8ce4a9f64845f876bc1bc560f3 (diff)
downloadmandoc-dfc72caad2158b1226363fe39e7bfa995ef68f78.tar.gz
mandoc-dfc72caad2158b1226363fe39e7bfa995ef68f78.tar.zst
mandoc-dfc72caad2158b1226363fe39e7bfa995ef68f78.zip
Support a second argument to -O man,
selecting the format according to local existence of the file. Suggested by kristaps@ during EuroBSDCon 2018. Written on the train Frankfurt-Karlsruhe returning from EuroBSDCon.
Diffstat (limited to 'mandoc.1')
-rw-r--r--mandoc.110
1 files changed, 7 insertions, 3 deletions
diff --git a/mandoc.1 b/mandoc.1
index 59350d9f..c35ef73a 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.1,v 1.228 2018/08/25 16:53:38 schwarze Exp $
+.\" $Id: mandoc.1,v 1.229 2018/10/02 12:33:37 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: August 25 2018 $
+.Dd $Mdocdate: October 2 2018 $
.Dt MANDOC 1
.Os
.Sh NAME
@@ -345,7 +345,7 @@ Instances of
are replaced with the include filename.
The default is not to present a
hyperlink.
-.It Cm man Ns = Ns Ar fmt
+.It Cm man Ns = Ns Ar fmt Ns Op ; Ns Ar fmt
The string
.Ar fmt ,
for example,
@@ -361,6 +361,10 @@ are replaced with the linked manual's name and section, respectively.
If no section is included, section 1 is assumed.
The default is not to
present a hyperlink.
+If two formats are given and a file
+.Ar %N.%S
+exists in the current directory, the first format is used;
+otherwise, the second format is used.
.It Cm style Ns = Ns Ar style.css
The file
.Ar style.css