summaryrefslogtreecommitdiffstats
path: root/bin/sh/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/eval.c')
-rw-r--r--bin/sh/eval.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c
index 585f91e..92a18e4 100644
--- a/bin/sh/eval.c
+++ b/bin/sh/eval.c
@@ -745,8 +745,9 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
/* Print the command if xflag is set. */
if (xflag) {
char sep = 0;
- const char *p;
- out2str(ps4val());
+ const char *p, *ps4;
+ ps4 = expandstr(ps4val());
+ out2str(ps4 != NULL ? ps4 : ps4val());
for (sp = varlist.list ; sp ; sp = sp->next) {
if (sep != 0)
out2c(' ');
OpenPOWER on IntegriCloud