Allow unclosed subshells in interactive mode

If the user has an unclosed subshell in interactive mode, break the
line instead of producing an error.

Fixes #6316
This commit is contained in:
ridiculousfish
2019-11-13 18:01:47 -08:00
parent ee982c4f6c
commit e18fd3cddb
2 changed files with 13 additions and 8 deletions

View File

@@ -891,6 +891,10 @@ static void test_parser() {
err(L"unterminated pipe not reported properly");
}
if (parse_util_detect_errors(L"echo (\nfoo\n bar") != PARSER_TEST_INCOMPLETE) {
err(L"unterminated multiline subhsell not reported properly");
}
if (parse_util_detect_errors(L"begin ; true ; end | ") != PARSER_TEST_INCOMPLETE) {
err(L"unterminated pipe not reported properly");
}