about summary refs log tree commit diff
path: root/Src/cond.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-08-01 15:06:25 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-08-01 15:06:25 +0000
commit8e90d2018cc807e9381330783d923b4efaee9786 (patch)
tree8a08f5cea02bb471095f5e5d605f705c37d68f6f /Src/cond.c
parentef74d743a0b5446376de4e40583968696bb703b3 (diff)
downloadzsh-8e90d2018cc807e9381330783d923b4efaee9786.tar.gz
zsh-8e90d2018cc807e9381330783d923b4efaee9786.tar.xz
zsh-8e90d2018cc807e9381330783d923b4efaee9786.zip
Dan Nelson: 17492: Quote output from xtrace
Diffstat (limited to 'Src/cond.c')
-rw-r--r--Src/cond.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Src/cond.c b/Src/cond.c
index 4a4dc24ed..4cc516924 100644
--- a/Src/cond.c
+++ b/Src/cond.c
@@ -147,9 +147,14 @@ evalcond(Estate state)
 		singsub(&rt);
 		untokenize(rt);
 	    }
-	    fprintf(xtrerr, " %s %s %s", left, condstr[ctype], rt);
-	} else
-	    fprintf(xtrerr, " -%c %s", ctype, left);
+	    fputc(' ',xtrerr);
+	    quotedzputs(left, xtrerr);
+	    fprintf(xtrerr, " %s ", condstr[ctype]);
+	    quotedzputs(rt, xtrerr);
+	} else {
+	    fprintf(xtrerr, " -%c ", ctype);
+	    quotedzputs(left, xtrerr);
+	}
     }
 
     if (ctype >= COND_EQ && ctype <= COND_GE) {