about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2013-10-10 17:12:50 +0100
committerPeter Stephenson <pws@zsh.org>2013-10-10 17:12:50 +0100
commit68a9bab11da470275fb28bea19e34db51a5093ba (patch)
treeb419ede8426eee741667905f7d134cd5ca996519 /Src/exec.c
parentdc272d0d14b126ee445c39d1de3962524930fb70 (diff)
downloadzsh-68a9bab11da470275fb28bea19e34db51a5093ba.tar.gz
zsh-68a9bab11da470275fb28bea19e34db51a5093ba.tar.xz
zsh-68a9bab11da470275fb28bea19e34db51a5093ba.zip
31809: Make whitespace clear in trace output for patterns.
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 1c44565f9..de1b4848e 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1845,9 +1845,22 @@ quote_tokenized_output(char *str, FILE *file)
 	case '*':
 	case '?':
 	case '$':
+	case ' ':
 	    putc('\\', file);
 	    break;
 
+	case '\t':
+	    fputs("$'\\t'", file);
+	    continue;
+
+	case '\n':
+	    fputs("$'\\n'", file);
+	    continue;
+
+	case '\r':
+	    fputs("$'\\r'", file);
+	    continue;
+
 	case '=':
 	    if (s == str)
 		putc('\\', file);