Skip to content

Fix unescaping of escape sequences by jline in REPL #5298

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

Merged
merged 1 commit into from
Oct 22, 2018
Merged

Fix unescaping of escape sequences by jline in REPL #5298

merged 1 commit into from
Oct 22, 2018

Conversation

nrjais
Copy link
Contributor

@nrjais nrjais commented Oct 19, 2018

Fixes #5294

Output

scala> "\\A"
val res0: String = \A

scala> "\A"
1 |"\A"
  |  ^
  |  invalid escape character

scala>

Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Have an awesome day! ☀️

@@ -62,6 +62,7 @@ final class JLineTerminal(needsTerminal: Boolean) extends java.io.Closeable {
.variable(BLINK_MATCHING_PAREN, 0L) // Don't blink the opening paren after typing a closing paren.
.option(INSERT_TAB, true) // At the beginning of the line, insert tab instead of completing.
.option(AUTO_FRESH_LINE, true) // if not at start of line before prompt, move to new line.
.option(DISABLE_EVENT_EXPANSION, true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment explaining why

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@allanrenucci I have added the comment.
Is it understandable?

Copy link
Contributor

@allanrenucci allanrenucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @nrjais!

Note that we usually expect regression tests with fixes. But we currently don't have any infrastructure to test the JLine integration so I'll merge as is.

@allanrenucci allanrenucci merged commit ad02512 into scala:master Oct 22, 2018
@nrjais nrjais deleted the repl-escape-issue branch October 22, 2018 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants