summaryrefslogtreecommitdiff
path: root/usr.bin/printf/printf.1
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2018-03-12 00:42:05 +0000
committerdholland <dholland@NetBSD.org>2018-03-12 00:42:05 +0000
commit8e210aeaeef191a78fd51e9b954f8ccdff80c350 (patch)
tree1aab3d47e860786eae6678d81201726083ce3290 /usr.bin/printf/printf.1
parent4b9f981740ff7d068cb94de08b676fa397d9162b (diff)
Explicitly mention use of -- for format strings beginning with -,
per PR 21970.
Diffstat (limited to 'usr.bin/printf/printf.1')
-rw-r--r--usr.bin/printf/printf.111
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/printf/printf.1 b/usr.bin/printf/printf.1
index 26cd07fd130..84b7018a9f4 100644
--- a/usr.bin/printf/printf.1
+++ b/usr.bin/printf/printf.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: printf.1,v 1.25 2014/04/13 01:45:34 snj Exp $
+.\" $NetBSD: printf.1,v 1.26 2018/03/12 00:42:05 dholland Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -32,7 +32,7 @@
.\"
.\" from: @(#)printf.1 8.1 (Berkeley) 6/6/93
.\"
-.Dd May 6, 2008
+.Dd March 11, 2018
.Dt PRINTF 1
.Os
.Sh NAME
@@ -358,6 +358,13 @@ Print a `%'; no argument is used.
In no case does a non-existent or small field width cause truncation of
a field; padding takes place only if the specified field width exceeds
the actual width.
+.Pp
+If the first character of
+.Ar format
+is a dash,
+.Ar format
+must be preceded by a word consisting of two dashes (--) to prevent it
+from being interpreted as an option string.
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO