summaryrefslogtreecommitdiffstats
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
commit9e238facdedce54e6eeccb030929d4b3893df873 (patch)
treeaf1153e654b28c1021d8c3934f87d6691336566e /mandoc.1
parent2b5f7b1a9ecbfb46e4d111a73e873c9ac394f261 (diff)
downloadmandoc-9e238facdedce54e6eeccb030929d4b3893df873.tar.gz
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.16
1 files changed, 5 insertions, 1 deletions
diff --git a/mandoc.1 b/mandoc.1
index 4cdfe150..afea0a1b 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -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