about summary refs log tree commit diff
path: root/Src/subst.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-23 13:21:09 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-23 13:21:09 +0000
commitf0a1c1aafec9f704afe939710d6c2c8c3fd639ad (patch)
treec467744e948489d82d36dc65442b09827659ad86 /Src/subst.c
parent8d679b92b47607a118c3555340e4f80b88548a53 (diff)
downloadzsh-f0a1c1aafec9f704afe939710d6c2c8c3fd639ad.tar.gz
zsh-f0a1c1aafec9f704afe939710d6c2c8c3fd639ad.tar.xz
zsh-f0a1c1aafec9f704afe939710d6c2c8c3fd639ad.zip
zsh-workers/8023
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 5b08d0bfb..45b58aef6 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -1618,8 +1618,8 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
 	opts[PROMPTPERCENT] = opp;
     }
     if (quotemod) {
-	if (--quotetype > 2)
-	    quotetype = 2;
+	if (--quotetype > 3)
+	    quotetype = 3;
 	if (isarr) {
 	    char **ap;
 
@@ -1628,7 +1628,10 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
 	    ap = aval;
 
 	    if (quotemod > 0) {
-		if (quotetype) {
+		if (quotetype == 3)
+		    for (; *ap; ap++)
+			*ap = nicedupstring(*ap);
+		else if (quotetype) {
 		    int sl;
 		    char *tmp;
 
@@ -1665,7 +1668,9 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
 	    if (!copied)
 		val = dupstring(val), copied = 1;
 	    if (quotemod > 0) {
-		if (quotetype) {
+		if (quotetype == 3)
+		    val = nicedupstring(val);
+		else if (quotetype) {
 		    int sl;
 		    char *tmp;