diff options
author | jilles <jilles@FreeBSD.org> | 2014-11-30 20:12:47 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2014-11-30 20:12:47 +0000 |
commit | 12b8cb671b4be8a6160f57b8a2953b27484bb520 (patch) | |
tree | 7c8f0756e04cfaa1b025c07a0e6e91544680340a /bin/sh/eval.c | |
parent | 36e42678041ef1c12fe60be43bad0ffca8f0b2da (diff) | |
download | FreeBSD-src-12b8cb671b4be8a6160f57b8a2953b27484bb520.zip FreeBSD-src-12b8cb671b4be8a6160f57b8a2953b27484bb520.tar.gz |
sh: Remove special case for '=' in set -x; always quote it in outqstr().
I plan to make set -x output always printable using $'...'; avoiding quoting
words containing '=' is not worth the extra complexity.
Diffstat (limited to 'bin/sh/eval.c')
-rw-r--r-- | bin/sh/eval.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c index c1a9cdb..d0460a0 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -774,15 +774,7 @@ xtracecommand(struct arglist *varlist, struct arglist *arglist) for (sp = arglist->list ; sp ; sp = sp->next) { if (sep != 0) out2c(' '); - /* Disambiguate command looking like assignment. */ - if (sp == arglist->list && - strchr(sp->text, '=') != NULL && - strchr(sp->text, '\'') == NULL) { - out2c('\''); - out2str(sp->text); - out2c('\''); - } else - out2qstr(sp->text); + out2qstr(sp->text); sep = ' '; } out2c('\n'); |