]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
doc: document dash bug with positional parameters
authorEric Blake <eblake@redhat.com>
Thu, 5 May 2011 14:29:21 +0000 (08:29 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 5 May 2011 14:29:21 +0000 (08:29 -0600)
* doc/autoconf.texi (Shell Substitutions) <${10}>: Document
a pitfall with $10.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
doc/autoconf.texi

index 14abf514397044ae44b967f9ec65fd076d2211d9..1fca7bbf2b46e40809328cd5f3c33681f7d2aa50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-05  Eric Blake  <eblake@redhat.com>
+
+       doc: document dash bug with positional parameters
+       * doc/autoconf.texi (Shell Substitutions) <${10}>: Document
+       a pitfall with $10.
+
 2011-04-27  Eric Blake  <eblake@redhat.com>
 
        docs: document NetBSD join bug
index b466e56090f460e8331b2459c71c123f504d413d..7ff693f5d00d45f7c382063bd4150881ea61a361 100644 (file)
@@ -15846,6 +15846,18 @@ $ @kbd{echo $@{10@}}
 bad substitution
 @end example
 
+Conversely, not all shells obey the Posix rule that when braces are
+omitted, multiple digits beyond a @samp{$} imply the single-digit
+positional parameter expansion concatenated with the remaining literal
+digits.  To work around the issue, you must use braces.
+
+@example
+$ @kbd{bash -c 'set a b c d e f g h i j; echo $10 $@{1@}0'}
+a0 a0
+$ @kbd{dash -c 'set a b c d e f g h i j; echo $10 $@{1@}0'}
+j a0
+@end example
+
 @item $@{@var{var}:-@var{value}@}
 @c Info cannot handle `:' in index entries.
 @ifnotinfo