From 0f880152fc5f1ea1b9f6207bc3c50b80f0730e45 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Thu, 16 Aug 2001 08:48:27 +0000 Subject: 15639 --- ChangeLog | 3 +++ Src/text.c | 12 +++++++++--- 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 + * 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(' '); -- cgit 1.4.1