commit bash-20150220 snapshot

This commit is contained in:
Chet Ramey
2015-02-23 16:29:18 -05:00
parent 09afa613b4
commit 60b80a1f45
8 changed files with 80 additions and 19 deletions
+7 -5
View File
@@ -567,11 +567,13 @@ declare_internal (list, local_var)
int vlen;
vlen = STRLEN (value);
/*itrace("declare_builtin: name = %s value = %s flags = %d", name, value, wflags);*/
#if 0 /* bash-4.4 */
if (value[0] == '(' && value[vlen-1] == ')' && (shell_compatibility_level <= 43 || (wflags & W_COMPASSIGN)))
#else
if (array_exists == 0 && value[0] == '(' && value[vlen-1] == ')')
#endif
if (shell_compatibility_level > 43 && (wflags & W_COMPASSIGN) == 0 &&
value[0] == '(' && value[vlen-1] == ')')
{
internal_warning (_("%s: quoted compound array assignment deprecated"), list->word->word);
compound_array_assign = 1;
}
else if (value[0] == '(' && value[vlen-1] == ')' && (shell_compatibility_level < 44 || (wflags & W_COMPASSIGN)))
compound_array_assign = 1;
else
simple_array_assign = 1;