summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2024-04-06 00:19:53 +0200
committerMikael Magnusson <mikachu@gmail.com>2024-04-07 16:05:39 +0200
commita66e92918568881af110a3e2e3018b317c054e4a (patch)
treeee774a6940d15ceeda3b70525ed87d373ccee098
parent49c6978dbbb717847344e7cef99e4ee26f56d234 (diff)
downloadzsh-a66e92918568881af110a3e2e3018b317c054e4a.tar.gz
zsh-a66e92918568881af110a3e2e3018b317c054e4a.zip
52878: Fix ${foo:^bar} where bar is an associative array
-rw-r--r--ChangeLog5
-rw-r--r--Src/subst.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 643a33dac..df3f9b73c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-04-07 Mikael Magnusson <mikachu@gmail.com>
+
+ * 52878: Src/subst.c: Fix ${foo:^bar} where bar is an associative
+ array
+
2024-04-01 Bart Schaefer <schaefer@zsh.org>
* 52865: Doc/Zsh/expn.yo, Doc/Zsh/params.yo, Etc/FAQ.yo:
diff --git a/Src/subst.c b/Src/subst.c
index f0d6c7a7b..a079672df 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -3475,6 +3475,9 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags,
char *sval;
zip = getaparam(s);
if (!zip) {
+ zip = gethparam(s);
+ }
+ if (!zip) {
sval = getsparam(s);
if (sval)
zip = hmkarray(sval);