diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-31 14:32:18 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-31 14:32:18 +0200 |
| commit | d0fff9155bc55d9576be4c6ba5f656f5b4856ac4 (patch) | |
| tree | 16fb968f08fdf41ab91a5b37a70424b7231954f1 | |
| parent | 75481d363454a3e0640a5bd0f78d2cc4403e6235 (diff) | |
| download | busybox-w32-d0fff9155bc55d9576be4c6ba5f656f5b4856ac4.tar.gz busybox-w32-d0fff9155bc55d9576be4c6ba5f656f5b4856ac4.tar.bz2 busybox-w32-d0fff9155bc55d9576be4c6ba5f656f5b4856ac4.zip | |
ash: fix display of ">&-" redirect in job strings
function old new delta
cmdtxt 558 569 +11
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | shell/ash.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 5c2e06599..9c61ce618 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -4642,6 +4642,10 @@ cmdputs(const char *s) | |||
| 4642 | /* These can only happen inside quotes */ | 4642 | /* These can only happen inside quotes */ |
| 4643 | cc[0] = c; | 4643 | cc[0] = c; |
| 4644 | str = cc; | 4644 | str = cc; |
| 4645 | //FIXME: | ||
| 4646 | // $ true $$ & | ||
| 4647 | // $ <cr> | ||
| 4648 | // [1]+ Done true ${\$} <<=== BUG: ${\$} is not a valid way to write $$ (${$} would be ok) | ||
| 4645 | c = '\\'; | 4649 | c = '\\'; |
| 4646 | break; | 4650 | break; |
| 4647 | default: | 4651 | default: |
| @@ -4823,7 +4827,10 @@ cmdtxt(union node *n) | |||
| 4823 | cmdputs(utoa(n->nfile.fd)); | 4827 | cmdputs(utoa(n->nfile.fd)); |
| 4824 | cmdputs(p); | 4828 | cmdputs(p); |
| 4825 | if (n->type == NTOFD || n->type == NFROMFD) { | 4829 | if (n->type == NTOFD || n->type == NFROMFD) { |
| 4826 | cmdputs(utoa(n->ndup.dupfd)); | 4830 | if (n->ndup.dupfd >= 0) |
| 4831 | cmdputs(utoa(n->ndup.dupfd)); | ||
| 4832 | else | ||
| 4833 | cmdputs("-"); | ||
| 4827 | break; | 4834 | break; |
| 4828 | } | 4835 | } |
| 4829 | n = n->nfile.fname; | 4836 | n = n->nfile.fname; |
