about summary refs log tree commit diff
diff options
context:
space:
mode:
-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