summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2021-04-09 21:01:37 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2021-04-09 21:01:37 +0100
commit283d2f3c2761ac549a647638bb7d8fd8de3dabb4 (patch)
treed7a9635d9b110e2f53550d6738abdd612140480e
parenteaff11c748e005bbcd14dbd1850880e4bffee3fa (diff)
downloadzsh-283d2f3c2761ac549a647638bb7d8fd8de3dabb4.tar.gz
zsh-283d2f3c2761ac549a647638bb7d8fd8de3dabb4.zip
48432 and enable test: fix quotiing of zstyle -L for zstyle -e
-rw-r--r--ChangeLog6
-rw-r--r--Src/Modules/zutil.c3
-rw-r--r--Test/V05styles.ztst2
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cb4ad6833..f894cc2fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-04-09 Peter Stephenson <p.w.stephenson@ntlworld.com>
+
+ * 48432 (plus test change): Src/Modules/zutil.c,
+ Test/V05styles.ztst: Fix quoting of zstyle -L output for
+ -e styles, and enable test.
+
2021-04-09 Oliver Kiddle <opk@zsh.org>
* 48378: Completion/Zsh/Command/_compadd: complete compadd
diff --git a/Src/Modules/zutil.c b/Src/Modules/zutil.c
index cecea6d51..691ba6c2f 100644
--- a/Src/Modules/zutil.c
+++ b/Src/Modules/zutil.c
@@ -200,7 +200,8 @@ printstylenode(HashNode hn, int printflags)
else {
printf("zstyle %s", (p->eval ? "-e " : ""));
quotedzputs(p->pat, stdout);
- printf(" %s", s->node.nam);
+ putchar(' ');
+ quotedzputs(s->node.nam, stdout);
}
for (v = p->vals; *v; v++) {
putchar(' ');
diff --git a/Test/V05styles.ztst b/Test/V05styles.ztst
index e4bdfece3..61d2cdb0a 100644
--- a/Test/V05styles.ztst
+++ b/Test/V05styles.ztst
@@ -171,5 +171,5 @@
a=( ${(M)a:#*con*text*ke*y*val*u*e} )
print -r -- "$a"
)
--f:zstyle -L escapes the key (regression: workers/48424)
+0:zstyle -L escapes the key (regression: workers/48424)
>zstyle $'con\C-@text' $'ke\C-@y' $'val\C-@u' e