diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 6f8bc9042..40ca82d0b 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -11999,8 +11999,11 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs) CHECKSTRSPACE(4, out); /* permit 4 calls to USTPUTC */ switch (SIT(c, synstack->syntax)) { case CNL: /* '\n' */ - if (synstack->syntax == BASESYNTAX) + if (synstack->syntax == BASESYNTAX + && !synstack->varnest + ) { goto endword; /* exit outer loop */ + } USTPUTC(c, out); nlprompt(); c = pgetc(); |