summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2021-07-29 16:25:20 +0000
committerIngo Schwarze <schwarze@openbsd.org>2021-07-29 16:25:20 +0000
commite10be3ca1ad0223d35ff599e2d2c6f5e7c1e0736 (patch)
treee351e6e64dc9cbe27eda8bca8be149b389bc5cf6
parente60414fcfdd86a7e2dcfaad4b5c71b441deb210d (diff)
downloadmandoc-e10be3ca1ad0223d35ff599e2d2c6f5e7c1e0736.tar.gz
Improve the description of .Fl in multiple respects and in paricular
improve the .Fl examples in multiple respects, including better demonstrating long options. Prompted by a question from espie@. Feedback and OK jmc@.
-rw-r--r--mdoc.728
1 files changed, 17 insertions, 11 deletions
diff --git a/mdoc.7 b/mdoc.7
index 3567ccc9..1c5fd5be 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -1568,19 +1568,25 @@ and
.It Ic \&Fl Op Ar word ...
Command-line flag or option.
Used when listing arguments to command-line utilities.
-Prints a fixed-width hyphen
-.Sq \-
-directly followed by each argument.
-If no arguments are provided, a hyphen is printed followed by a space.
-If the argument is a macro, a hyphen is prefixed to the subsequent macro
-output.
+For each argument, prints an ASCII hyphen-minus character
+.Sq \- ,
+immediately followed by the argument.
+If no arguments are provided, a hyphen-minus is printed followed by a space.
+If the argument is a macro, a hyphen-minus is prefixed
+to the subsequent macro output.
.Pp
Examples:
-.Dl ".Fl R Op Fl H | L | P"
-.Dl ".Op Fl 1AaCcdFfgHhikLlmnopqRrSsTtux"
-.Dl ".Fl type Cm d Fl name Pa CVS"
-.Dl ".Fl Ar signal_number"
-.Dl ".Fl o Fl"
+.Dl ".Nm du Op Fl H | L | P"
+.Dl ".Nm ls Op Fl 1AaCcdFfgHhikLlmnopqRrSsTtux"
+.Dl ".Nm route Cm add Fl inet Ar destination gateway"
+.Dl ".Nm locate.updatedb Op Fl \e-fcodes Ns = Ns Ar dbfile"
+.Dl ".Nm aucat Fl o Fl"
+.Dl ".Nm kill Fl Ar signal_number"
+.Pp
+For GNU-sytle long options, escaping the additional hyphen-minus is not
+strictly required, but may be safer with future versions of GNU troff; see
+.Xr mandoc_char 7
+for details.
.Pp
See also
.Ic \&Cm .