aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index d82eba15f..ed1a4416c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12467,10 +12467,12 @@ parsesub: {
pungetc();
}
- if (newsyn == ARISYNTAX && subtype > VSNORMAL)
+ if (newsyn == ARISYNTAX)
newsyn = DQSYNTAX;
- if (newsyn != synstack->syntax) {
+ if ((newsyn != synstack->syntax || synstack->innerdq)
+ && subtype != VSNORMAL
+ ) {
synstack_push(&synstack,
synstack->prev ?: alloca(sizeof(*synstack)),
newsyn);