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

Can't use arrow keys on Windows jirb #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yousuketto
Copy link

Issue

I can't use arrow keys on Windows jirb.

Versions which this issue occurs

  • From JRuby 1.7.5
    When I type arrow keys, , , and are inputed.

  • From JRuby 9.1.3.0
    When I type arrow keys, a cursor doesn't move.

Causes

I found the following two causes.

First cause is JLine bug which was fixed in JLine 2.12. So we need to update JLine version.
(Currently JLine is updated in master branch of jruby/jruby, but it has not been released.)

Second cause is an argument of ConsoleReader constructor.
Related commit is 36c4315.
I can't understand why I can't use arrow keys.
But, it looks good when I changed InputStream to FileInputStream which is default of ConsoleReader constructor.

@yousuketto yousuketto changed the title Enable arrow keys on Windows jirb Can't use arrow keys on Windows jirb Dec 3, 2018
@enebo enebo requested a review from kares December 3, 2018 17:00
@kares
Copy link
Member

kares commented Dec 3, 2018

not sure about these changes ... yet 36c4315 seems reasonable // cc @headius
thus maybe we shall rather add some 'clever' detection if JRuby in/out == Java in/out

(Currently JLine is updated in master branch of jruby/jruby, but it has not been released.)

we shall work-around pushing to RGs ... in the mean time could you check how 1.3.7 is working for you?
find the gem here: https://oss.sonatype.org/content/repositories/releases/rubygems/jruby-readline/1.3.7/

@yousuketto
Copy link
Author

yousuketto commented Dec 4, 2018

thus maybe we shall rather add some 'clever' detection if JRuby in/out == Java in/out

I think so too. But, it is difficult for me to fix in/out so I gave up and created this PR... sorry.

I hope this PR is merged if the clever way is difficult or needed long time or many resources for jruby developers. (because arrow keys are disabled on Windows jirb.)
However, I think this PR is not so good, so please close this PR if you think this PR should not be merged.

we shall work-around pushing to RGs ... in the mean time could you check how 1.3.7 is working for you?

Thank you. I didn't know this. I'll use when new JRuby or new jruby-readline which fixes this issue is released.

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.

2 participants