changes to make builtins that perform assignments work better with arbitrary associative array keys

This commit is contained in:
Chet Ramey
2022-01-04 10:54:28 -05:00
parent 186129835e
commit 1d17c604fc
12 changed files with 649 additions and 480 deletions
+2 -2
View File
@@ -1161,12 +1161,12 @@ expr_streval (tok, e, lvalue)
initial_depth = expr_depth;
#if defined (ARRAY_VARS)
tflag = assoc_expand_once && already_expanded; /* for a start */
tflag = (assoc_expand_once && already_expanded) ? AV_NOEXPAND : 0; /* for a start */
#endif
/* [[[[[ */
#if defined (ARRAY_VARS)
aflag = (tflag) ? AV_NOEXPAND : 0;
aflag = tflag; /* use a different variable for now */
v = (e == ']') ? array_variable_part (tok, tflag, (char **)0, (int *)0) : find_variable (tok);
#else
v = find_variable (tok);