diff --git a/reader/src/main/java/org/jline/reader/impl/DefaultParser.java b/reader/src/main/java/org/jline/reader/impl/DefaultParser.java index 1f2047d0b..789b74307 100644 --- a/reader/src/main/java/org/jline/reader/impl/DefaultParser.java +++ b/reader/src/main/java/org/jline/reader/impl/DefaultParser.java @@ -162,7 +162,7 @@ public ParsedLine parse(final String line, final int cursor, ParseContext contex if (eofOnEscapedNewLine && isEscapeChar(line, line.length() - 1)) { throw new EOFError(-1, -1, "Escaped new line", "newline"); } - if (eofOnUnclosedQuote && quoteStart >= 0) { + if (eofOnUnclosedQuote && quoteStart >= 0 && context != ParseContext.COMPLETE) { throw new EOFError(-1, -1, "Missing closing quote", line.charAt(quoteStart) == '\'' ? "quote" : "dquote"); }