]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - parse.y
commit bash-20120907 snapshot
[thirdparty/bash.git] / parse.y
diff --git a/parse.y b/parse.y
index 58a3a97fb7662ba3c7888bd0e5241fef71c60e9e..c0da6301fe078b2863c4da52c0f76f674c151286 100644 (file)
--- a/parse.y
+++ b/parse.y
@@ -4723,7 +4723,11 @@ got_token:
       the_word->flags |= W_ASSIGNMENT;
       /* Don't perform word splitting on assignment statements. */
       if (assignment_acceptable (last_read_token) || (parser_state & PST_COMPASSIGN) != 0)
-       the_word->flags |= W_NOSPLIT;
+       {
+         the_word->flags |= W_NOSPLIT;
+         if (parser_state & PST_COMPASSIGN)
+           the_word->flags |= W_NOGLOB;        /* XXX - W_NOBRACE? */
+       }
     }
 
   if (command_token_position (last_read_token))
@@ -4743,7 +4747,11 @@ got_token:
     {
       /* can use token; already copied to the_word */
       token[token_index-1] = '\0';
+#if defined (ARRAY_VARS)
+      if (legal_identifier (token+1) || valid_array_reference (token+1))
+#else
       if (legal_identifier (token+1))
+#endif
        {
          strcpy (the_word->word, token+1);
 /*itrace("read_token_word: returning REDIR_WORD for %s", the_word->word);*/