diff --git a/bin/sh/mksyntax.c b/bin/sh/mksyntax.c index f5bc51a2251b..7a38ad192025 100644 --- a/bin/sh/mksyntax.c +++ b/bin/sh/mksyntax.c @@ -232,6 +232,7 @@ main(int argc __unused, char **argv __unused) add("\n", "CNL"); add("\\", "CBACK"); add("`", "CBQUOTE"); + add("\"", "CDQUOTE"); add("$", "CVAR"); add("}", "CENDVAR"); add("(", "CLP"); diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 64c97aa451a4..29ccd83f5a43 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -1223,7 +1223,10 @@ readtoken1(int firstc, char const *initialsyntax, char *eofmark, int striptabs) if (eofmark != NULL && newvarnest == 0) USTPUTC(c, out); else { - state[level].syntax = BASESYNTAX; + if (state[level].category == TSTATE_ARITH) + state[level].syntax = ARISYNTAX; + else + state[level].syntax = BASESYNTAX; quotef++; } break;