+2007-05-05 Noah Misch <noah@cs.caltech.edu>
+
+ * lib/autotest/general.m4 (_AT_NORMALIZE_TEST_GROUP_NUMBER): Use `eval'.
+ * doc/autoconf.texi ($@, case): Document Zsh limitations.
+
2007-05-03 Stepan Kasal <kasal@ucw.cz>
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Put a.out first.
test "$@{ZSH_VERSION+set@}" = set && alias -g '$@{1+"$@@"@}'='"$@@"'
@end example
+Zsh only recognizes this alias when a shell word matches it exactly;
+@samp{"foo"$@{1+"$@@"@}} remains subject to word splitting. Since this
+case always yields at least one shell word, use plain @samp{"$@@"}.
+
A more conservative workaround is to avoid @samp{"$@@"} if it is
possible that there may be no positional arguments. For example,
instead of:
but the @code{(} in this example is not portable to many Bourne
shell implementations. It can be omitted safely.
+Zsh handles pattern fragments derived from parameter expansions or
+command substitutions as though quoted:
+
+@example
+$ pat=\?; case aa in ?$pat) echo match;; esac
+$ pat=\?; case a? in ?$pat) echo match;; esac
+match
+@end example
+
+@noindent
Because of a bug in its @code{fnmatch}, Bash fails to properly
handle backslashes in character classes:
# all the other test group numbers.
m4_define([_AT_NORMALIZE_TEST_GROUP_NUMBER],
[
- while :; do
+ eval 'while :; do
case $$1 in #(
- $at_format*) break;;
+ '"$at_format"'*) break;;
esac
$1=0$$1
- done
+ done'
])
# _AT_CREATE_DEBUGGING_SCRIPT