change expansion for key-value pair compound assignment to associative arrays to split all words before identifying keys and values; controlled by a new shopt option: kvpair_split, enabled by default; new `loadassoc' loadable builtin to load an associative array from a set of key-value arguments

This commit is contained in:
Chet Ramey
2026-08-17 10:09:07 -04:00
parent 9c8a70bc9e
commit 2f7eb80c77
38 changed files with 1083 additions and 1012 deletions
+1 -1
View File
@@ -10121,7 +10121,7 @@ parameter_brace_expand (char *string, size_t *indexp, int quoted, int pflags, in
sindex = *indexp;
t_index = ++sindex;
/* ${#var} doesn't have any of the other parameter expansions on it. */
if (string[t_index] == '#' && legal_variable_starter (string[t_index+1])) /* {{ */
if (string[t_index] == '#' && legal_variable_starter ((unsigned char)string[t_index+1])) /* {{ */
name = string_extract (string, &t_index, "}", SX_VARNAME);
else
#if defined (CASEMOD_EXPANSIONS)