commit bash-20120824 snapshot

This commit is contained in:
Chet Ramey
2012-09-13 11:53:51 -04:00
parent 200aed9a45
commit df0e4bfe75
11 changed files with 125 additions and 52 deletions
+6 -1
View File
@@ -684,12 +684,17 @@ quote_array_assignment_chars (list)
{
if (l->word == 0 || l->word->word == 0 || l->word->word[0] == '\0')
continue; /* should not happen, but just in case... */
/* Don't bother if it doesn't look like [ind]=value */
/* Don't bother if it hasn't been recognized as an assignment or
doesn't look like [ind]=value */
if ((l->word->flags & W_ASSIGNMENT) == 0)
continue;
if (l->word->word[0] != '[' || mbschr (l->word->word, '=') == 0) /* ] */
continue;
nword = quote_assign (l->word->word);
free (l->word->word);
l->word->word = nword;
l->word->flags |= W_NOGLOB; /* XXX - W_NOSPLIT also? */
}
}