I'm using SBT 0.13.6 on Windows 7, and I'm running it using Cygwin (bash shell). I have a problem with the arrow keys: Arrow-up moves the cursor up, whereas I want it to cycle through the command history (and I think that's what it should do by default).
The problem seems to be what's printed in the terminal. When I press: [arrow up] [enter], it does execute the previous command. But what I see in the terminal is the cursor moving up one line, and after the enter, it prints the previous command and execute it.
It should, of course, print the previous command immediately after I hit arrow-up, and it should not move the cursor (not vertically at least)
The command-line in SBT is handled by JLine 2. Running JLine in trace mode I can see that it does recognize the key-presses and it has mapped the arrow-up to "previous-history", but the terminal is not updated correctly.
I also had the problem that I had to manually insert an end-of-line character for a command to be entered, which was fixed by adding the following option to my SBT start-up script:
-Djline.terminal=unix
I have tried the other options as well (win, auto, off, etc). I have put the following lines in a file jline.inputrc in my home directory, but it doesn't help:
"\e[A": previous-history
"\e[B": next-history
And in fact I didn't think it should help, because I can see that the key-presses are recognized correctly and mapped to the right command.
The behaviour does not depend on which arrow keys I use (the ones on the numeric keypad or not).
A work-around is to run SBT directly from the Windows command shell (cmd.exe).
Does anyone know of a way to fix this, so that command-history cycling works as expected in Cygwin?