summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-08-16 08:48:27 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-08-16 08:48:27 +0000
commit0f880152fc5f1ea1b9f6207bc3c50b80f0730e45 (patch)
tree3d094719ecd7a85c56ef9ad47ec7818613dc2d27
parent1a1d270e1393995cbb3f2e1e22a5d33b650d4eec (diff)
downloadzsh-0f880152fc5f1ea1b9f6207bc3c50b80f0730e45.tar.gz
zsh-0f880152fc5f1ea1b9f6207bc3c50b80f0730e45.zip
15639
-rw-r--r--ChangeLog3
-rw-r--r--Src/text.c12
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d2311cf6..47828857b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2001-08-16 Sven Wischnowsky <wischnow@zsh.org>
+ * 15639: Src/text.c: fix bug for output of unquoted here-docs and
+ -strings with special characters
+
* 15638: Completion/Base/Completer/_approximate: make sure that
there is one of the group-options before using it
diff --git a/Src/text.c b/Src/text.c
index 7595c9add..2215b45fd 100644
--- a/Src/text.c
+++ b/Src/text.c
@@ -751,9 +751,15 @@ getredirs(LinkList redirs)
taddstr(fstr[f->type]);
taddchr(' ');
if (f->type == REDIR_HERESTR) {
- taddchr('\'');
- taddstr(bslashquote(f->name, NULL, 1));
- taddchr('\'');
+ if (has_token(f->name)) {
+ taddchr('\"');
+ taddstr(bslashquote(f->name, NULL, 2));
+ taddchr('\"');
+ } else {
+ taddchr('\'');
+ taddstr(bslashquote(f->name, NULL, 1));
+ taddchr('\'');
+ }
} else
taddstr(f->name);
taddchr(' ');