about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/exec.c13
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index da52f2a9d..25fb77933 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-10  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* 31809: Src/exec.c: make whitespace clear in trace output for
+	patterns.
+
 2013-10-08  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* Eric Cook: 31801: Completion/Linux/Command/_btrfs: some
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);