aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/shell/ash.c b/shell/ash.c
index ee7642a64..33a477d80 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11316,9 +11316,9 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
parenlevel--;
} else {
if (pgetc() == ')') {
+ c = CTLENDARI;
if (--arinest == 0) {
syntax = prevsyntax;
- c = CTLENDARI;
}
} else {
/*
@@ -11809,18 +11809,12 @@ parsearith: {
if (++arinest == 1) {
prevsyntax = syntax;
syntax = ARISYNTAX;
- USTPUTC(CTLARI, out);
- if (dblquote)
- USTPUTC('"', out);
- else
- USTPUTC(' ', out);
- } else {
- /*
- * we collapse embedded arithmetic expansion to
- * parenthesis, which should be equivalent
- */
- USTPUTC('(', out);
}
+ USTPUTC(CTLARI, out);
+ if (dblquote)
+ USTPUTC('"', out);
+ else
+ USTPUTC(' ', out);
goto parsearith_return;
}
#endif