* doc/coreutils.texi (printDash): New macro.
(printf invocation, yes invocation): Use it.
Addresses https://bugs.gnu.org/79896
---
 doc/coreutils.texi | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index ca01011d6..94a408217 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -12928,8 +12928,14 @@ @node printf invocation
     > sample.sh
 @end example
 
-The only options are a lone @option{--help} or
-@option{--version}.  @xref{Common options}.
+@macro printDash{command}
+To output an argument that begins with @samp{-}, precede it with
+@option{--}, e.g., @samp{\command\ -- --help}.
+@end macro
+
+The only options are a lone @option{--help} or @option{--version}.
+@printDash{printf}
+@xref{Common options}.
 Options must precede operands.
 
 @exitstatus
@@ -12948,8 +12954,7 @@ @node yes invocation
 Upon a write error, @command{yes} exits with status @samp{1}.
 
 The only options are a lone @option{--help} or @option{--version}.
-To output an argument that begins with
-@samp{-}, precede it with @option{--}, e.g., @samp{yes -- --help}.
+@printDash{yes}
 @xref{Common options}.
 
 
-- 
2.52.0


Reply via email to