summaryrefslogtreecommitdiff
path: root/doc/autoconf.texi
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-05-05 08:29:21 -0600
committerEric Blake <eblake@redhat.com>2011-05-05 08:29:21 -0600
commit2105ae97000c7c77442b3a788c90d8fee63bd2b3 (patch)
tree7e61f0b36a8c74b24d209770d4ab7170aa4644bb /doc/autoconf.texi
parent5daf0f340412e5733da4e3e474ebbb867c2ebf86 (diff)
downloadautoconf-2105ae97000c7c77442b3a788c90d8fee63bd2b3.tar.gz
doc: document dash bug with positional parameters
* doc/autoconf.texi (Shell Substitutions) <${10}>: Document a pitfall with $10. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'doc/autoconf.texi')
-rw-r--r--doc/autoconf.texi12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index b466e560..7ff693f5 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -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