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

JLine is probably not restoring stty settings on unix terminals #210

Open
abinoam opened this issue Aug 22, 2015 · 1 comment
Open

JLine is probably not restoring stty settings on unix terminals #210

abinoam opened this issue Aug 22, 2015 · 1 comment

Comments

@abinoam
Copy link

abinoam commented Aug 22, 2015

I have posted this on jruby/jruby#3181
In JRuby (that uses jline) after using Readline.readline the stty settings changes (canonical mode) and is not restored after getting the input. So that if I try to get any string by stantard Ruby gets method I'm not able to press return It just print out ^M

Details on jruby/jruby#3181
@headius helped me to confirm the issue and to understand it further.

@gnodet
Copy link
Member

gnodet commented Nov 10, 2015

Do you know how jruby is using JLine exactly ?
I think the following calls should work:

ConsoleReader reader = new ConsoleReader();
...
reader.shutdown();
reader.getTerminal().restore();

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

No branches or pull requests

2 participants