diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-08-16 08:48:27 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-08-16 08:48:27 +0000 |
commit | 0f880152fc5f1ea1b9f6207bc3c50b80f0730e45 (patch) | |
tree | 3d094719ecd7a85c56ef9ad47ec7818613dc2d27 /Src/text.c | |
parent | 1a1d270e1393995cbb3f2e1e22a5d33b650d4eec (diff) | |
download | zsh-0f880152fc5f1ea1b9f6207bc3c50b80f0730e45.tar.gz zsh-0f880152fc5f1ea1b9f6207bc3c50b80f0730e45.tar.xz zsh-0f880152fc5f1ea1b9f6207bc3c50b80f0730e45.zip |
15639
Diffstat (limited to 'Src/text.c')
-rw-r--r-- | Src/text.c | 12 |
1 files changed, 9 insertions, 3 deletions
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(' '); |