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

Tab in multi-line input causes org.jline.reader.EOFError #2350

Closed
rmoff opened this issue Jan 15, 2019 · 3 comments · Fixed by #2734
Closed

Tab in multi-line input causes org.jline.reader.EOFError #2350

rmoff opened this issue Jan 15, 2019 · 3 comments · Fixed by #2734

Comments

@rmoff
Copy link
Member

rmoff commented Jan 15, 2019

By default, KSQL CLI will ignore the tab character at the beginning of a new line. However if a multi-line statement is used, a tab will cause an error:

ksql> PRINT \
>Jan 15, 2019 2:34:31 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(DefaultParser.java:163)
        at io.confluent.ksql.cli.console.TrimmingParser.parse(TrimmingParser.java:49)
        at org.jline.reader.impl.LineReaderImpl.doComplete(LineReaderImpl.java:3952)
        at org.jline.reader.impl.LineReaderImpl.expandOrComplete(LineReaderImpl.java:3875)
        at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:585)
        at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:404)
        at io.confluent.ksql.cli.console.JLineReader.readLine(JLineReader.java:125)
        at io.confluent.ksql.cli.Cli.readLine(Cli.java:218)
        at io.confluent.ksql.cli.Cli.runInteractively(Cli.java:102)
        at io.confluent.ksql.Ksql.main(Ksql.java:64)

To reproduce the above, enter the keys P R I N T \ <return> <tab>

The reason that this is a problem is that pasted code samples may inadvertently have tabs present, causing a confusing experience for the user.

Confluent Platform 5.1.0

@big-andy-coates
Copy link
Contributor

Tested in master - this is no longer an issue.

@rmoff, would you mind re-testing to ensure you agree, please?

@rmoff
Copy link
Member Author

rmoff commented Feb 8, 2019

Tested against master, issue is still present:

ksql

@rmoff rmoff reopened this Feb 8, 2019
ouertani added a commit to ouertani/ksql that referenced this issue Apr 25, 2019
@ouertani
Copy link
Contributor

@rmoff could you please check #2734

spena pushed a commit that referenced this issue May 7, 2019
…2734)

I am merging this with one approval as it just upgraded the JLine version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants