]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Further improve docs about nested double-quotes and backquotes.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 23 Jun 2010 17:55:02 +0000 (19:55 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 23 Jun 2010 18:41:34 +0000 (20:41 +0200)
* doc/autoconf.texi (Shellology): Remove anchor for pdksh.
Move quoting bug example to ...
(Shell Substitutions): ... here.  Document which behavior is
specified by Posix.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
doc/autoconf.texi

index 21aa16a77935e29d037681d92860444937c9e17c..d3983c1d9a71a3f0c29b1eb2a92e8689116716fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Further improve docs about nested double-quotes and backquotes.
+       * doc/autoconf.texi (Shellology): Remove anchor for pdksh.
+       Move quoting bug example to ...
+       (Shell Substitutions): ... here.  Document which behavior is
+       specified by Posix.
+
        Coverage for Fortran compiler macros.
        * tests/fortran.at (AC_OPENMP and Fortran 77)
        (AC_OPENMP and Fortran): Simplify, using AT_CHECK_CONFIGURE.
index 81b0845a6f2d43b60778c88278a0a48dcb18d3c6..34ae872b5c56ded3943dd3743b23f482ad5089cd 100644 (file)
@@ -14639,7 +14639,6 @@ the standard shell conform to Posix.
 
 @item Pdksh
 @prindex @samp{pdksh}
-@anchor{pdksh}
 A public-domain clone of the Korn shell called @command{pdksh} is widely
 available: it has most of the @samp{ksh88} features along with a few of
 its own.  It usually sets @code{KSH_VERSION}, except if invoked as
@@ -14647,20 +14646,7 @@ its own.  It usually sets @code{KSH_VERSION}, except if invoked as
 Posix compatibility by running @samp{set -o posix}.  Unfortunately, with
 @command{pdksh} 5.2.14 (the latest stable version as of January 2007)
 Posix mode is buggy and causes @command{pdksh} to depart from Posix in
-at least one respect:
-
-@example
-$ @kbd{echo "`echo \"hello\"`"}
-hello
-$ @kbd{set -o posix}
-$ @kbd{echo "`echo \"hello\"`"}
-"hello"
-@end example
-
-The last line of output contains spurious quotes.  This is yet another
-reason why portable shell code should not contain
-@code{"`@dots{}\"@dots{}\"@dots{}`"} constructs (@pxref{Shell
-Substitutions}).
+at least one respect, see @ref{Shell Substitutions}.
 
 @item Zsh
 @cindex Zsh
@@ -15163,9 +15149,22 @@ ksh: bar | sed 's, ,,': cannot execute
 @end example
 
 @noindent
-Worse yet, not all shells understand @code{"`@dots{}\"@dots{}\"@dots{}`"}
-the same way (@pxref{pdksh}).  There is just no portable way to use double-quoted
-strings inside double-quoted back-quoted expressions (pfew!).
+Posix does not specify behavior for this sequence.  On the other hand,
+behavior for @code{"`@dots{}\"@dots{}\"@dots{}`"} is specified by Posix,
+but in practice, not all shells understand it the same way: pdksh 5.2.14
+prints spurious quotes when in Posix mode:
+
+@example
+$ @kbd{echo "`echo \"hello\"`"}
+hello
+$ @kbd{set -o posix}
+$ @kbd{echo "`echo \"hello\"`"}
+"hello"
+@end example
+
+@noindent
+There is just no portable way to use double-quoted strings inside
+double-quoted back-quoted expressions (pfew!).
 
 @table @code
 @item $@@