summaryrefslogtreecommitdiff
path: root/footobar.c
diff options
context:
space:
mode:
authorToby Goodwin <toby@paccrat.org>2014-09-02 08:01:39 +0100
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:22:10 +0100
commita8699a58d8632f21e897ea5c4900a15483a9a8ca (patch)
treefd8e7910807eb91bcd79d498582959f1d750f9c6 /footobar.c
parentd884971193ef4934424b77ae862e8b0ecf70bab3 (diff)
release: rc-1.7.2
Diffstat (limited to 'footobar.c')
-rw-r--r--footobar.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/footobar.c b/footobar.c
index 4430c05..d6f6dfd 100644
--- a/footobar.c
+++ b/footobar.c
@@ -5,6 +5,8 @@
#include "rc.h"
+#include "input.h"
+
/* protect an exported name from brain-dead shells */
#if PROTECT_ENV
@@ -73,7 +75,8 @@ static bool Tconv(Format *f, int ignore) {
case nForin: fmtprint(f, "for(%T in %T)%T", n->u[0].p, n->u[1].p, n->u[2].p); break;
case nVarsub: fmtprint(f, "$%T(%T)", n->u[0].p, n->u[1].p); break;
case nWord:
- fmtprint(f, quotep(n->u[0].s, dollar) ? "%#S" : "%S", n->u[0].s);
+ fmtprint(f, n->u[2].i && quotep(n->u[0].s, dollar) ?
+ "%#S" : "%S", n->u[0].s);
break;
case nLappend: {
static bool inlist;