Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command completion fails when value starts with escape character: org.jline.reader.EOFError #364

offbynull opened this Issue Mar 6, 2019 · 0 comments


None yet
1 participant
Copy link

offbynull commented Mar 6, 2019

When terminal is created with a default parser and eofOnEscapedNewLine is set to true, tab completion on value that starts with '' will fail to EOFError exception.

Terminal terminal = TerminalBuilder.builder().build();

Completer completer = new StringsCompleter("foo", "bar", "baz");

DefaultParser parser = new DefaultParser();

LineReader reader = LineReaderBuilder.builder()

while (true) {
    String line = null;
    try {
        line = reader.readLine("prompt >", null, (MaskingCallback) null, null);
    } catch (UserInterruptException e) {
        // Ignore
    } catch (EndOfFileException e) {

    if (line == null) {

    line = line.trim();

prompt >test \Mar 06, 2019 1:56:14 PM org.jline.utils.Log logr
INFO: Error while parsing line
org.jline.reader.EOFError: Escaped new line
        at org.jline.reader.impl.DefaultParser.parse(
        at org.jline.reader.impl.LineReaderImpl.doComplete(
        at org.jline.reader.impl.LineReaderImpl.expandOrComplete(
        at org.jline.reader.impl.LineReaderImpl$1.apply(
        at org.jline.reader.impl.LineReaderImpl.readLine(

prompt >

Issue may be related to #257.

mattirn added a commit to mattirn/jline3 that referenced this issue Mar 12, 2019

@gnodet gnodet closed this in e1b0fde Mar 15, 2019

gnodet added a commit that referenced this issue Mar 15, 2019

gnodet added a commit that referenced this issue Mar 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.