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 2.14.1 fails to read single keystrokes under git bash on windows #259

Closed
radai-rosenblatt opened this issue May 21, 2016 · 4 comments

Comments

@radai-rosenblatt
Copy link

im running an application using jline from git bash on windows 7. the application source code does this:

Terminal terminal = TerminalFactory.create();
ConsoleReader reader = new ConsoleReader("whatever", System.in, System.out, terminal);
int read = reader.readCharacter();

when run as-is the terminal returned from the factory call is a windows terminal, and it fails to read anything. after CTRL-C is hit and the program exists all the keystrokes typed are passed onto bash (who returns with a "command not found") indicating theyre probably never consumed.

when i try manually creating a UnixTerminal:

Terminal terminal = new UnixTerminal();
terminal.init();
//rest as before

the characters are returned (read) only when i hit enter (so i can read lines but not single keystrokes).

git bash version:

$ uname -a
MINGW64_NT-6.1 latitude 2.5.0(0.295/5/3) 2016-03-31 18:47 x86_64 Msys
$ echo $0
/usr/bin/bash
@radai-rosenblatt radai-rosenblatt changed the title jline 2.14.1 fails to read lines under git bash on windows jline 2.14.1 fails to read single keystrokes under git bash on windows May 21, 2016
@bdw429s
Copy link
Contributor

bdw429s commented Aug 10, 2016

@radai-rosenblatt Please see this ticket which is a possible duplicate:
#245

@radai-rosenblatt
Copy link
Author

yeah, does look like a dup.

@bdw429s
Copy link
Contributor

bdw429s commented Aug 10, 2016

@radai-rosenblatt To help keep @gnodet 's sanity, you may consider closing this ticket and adding your details to the other one which already has some conversation on it.

@radai-rosenblatt
Copy link
Author

this is a dup of #245

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