about summary refs log tree commit diff
path: root/Src/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/text.c')
-rw-r--r--Src/text.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Src/text.c b/Src/text.c
index ab052b22a..fbc393e26 100644
--- a/Src/text.c
+++ b/Src/text.c
@@ -737,7 +737,12 @@ getredirs(LinkList redirs)
 		taddchr('0' + f->fd1);
 	    taddstr(fstr[f->type]);
 	    taddchr(' ');
-	    taddstr(f->name);
+	    if (f->type == HERESTR) {
+		taddchr('\'');
+		taddstr(bslashquote(f->name, NULL, 1));
+		taddchr('\'');
+	    } else
+		taddstr(f->name);
 	    taddchr(' ');
 	    break;
 #ifdef DEBUG