From 32aec355968f7d1d0640f9e6006235f62ef3070b Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Sun, 23 Feb 2003 23:00:02 +0000 Subject: [PATCH] * doc/autoconf.texi (Limitations of Builtins): Add notes on printf format starting with "-". --- ChangeLog | 5 +++++ doc/autoconf.texi | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index c67890601..ad32dddd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-02-24 Kevin Ryde + + * doc/autoconf.texi (Limitations of Builtins): Add notes on printf + format starting with "-". + 2003-02-20 Alexandre Duret-Lutz * doc/autoconf.texi (Limitations of Make): `foo=bar make -e' diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 921857579..dbe097410 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -9812,6 +9812,21 @@ fi @end example +@item @command{printf} +@c ------------------ +@prindex @command{printf} +A format string starting with a @samp{-} can cause problems. +@command{bash} (eg. 2.05b) will interpret it as an options string and +give an error. And @samp{--} to mark the end of options is not good +in the NetBSD Almquist shell (eg. 0.4.6) which will take that +literally as the format string. Putting the @samp{-} in a @samp{%c} +or @samp{%s} is probably the easiest way to avoid doubt, + +@example +printf %s -foo +@end example + + @item @command{pwd} @c ---------------- @prindex @command{pwd} -- 2.47.3