Skip to content
New issue

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

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

Already on GitHub? # to your account

Regression: >.... prompt when using dumb terminal #411

Closed
stephan-gh opened this issue Jul 4, 2019 · 2 comments
Closed

Regression: >.... prompt when using dumb terminal #411

stephan-gh opened this issue Jul 4, 2019 · 2 comments
Milestone

Comments

@stephan-gh
Copy link
Contributor

stephan-gh commented Jul 4, 2019

Using LineReader on JLine 1.12.0 produces a >.... prompt instead of the specified prompt
(here: $ ) in dumb terminals. Native terminals do not seem to be affected.

Example code:

LineReader reader = LineReaderBuilder.builder().build();
while (true) {
    reader.readLine("$ ");
}

Run it in IntelliJ IDEA or another dumb terminal, or use the system properties to force a dumb terminal. The >.... prompt is shown instead of $ . It works fine on JLine 1.11.0 and below.

I suspect that #311 is the cause of this, since it added a StringBuilder with that string:
062d25c#diff-10c315592498f1bd016543e7c8d26ab5R3743 (cc @mattirn)

I don't really understand the code this commit changed, so I'm not sure about the purpose of that string for the string builder. It looks somewhat suspicious...

@stephan-gh
Copy link
Contributor Author

@mattirn Thanks for the patch! I tested #412 and the issue is gone. 👍

gnodet added a commit that referenced this issue Jul 7, 2019
Fix dumb terminal prompt, fixes issue #411
@gnodet gnodet added this to the 3.12.1 milestone Jul 8, 2019
@gnodet gnodet closed this as completed Jul 8, 2019
@gnodet
Copy link
Member

gnodet commented Jul 8, 2019

JLine 3.12.1 has been released with this fix.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants