i have this issue (https://github.com/sbt/sbt/issues/562) basically when I try to get a console it says:
[ERROR] Failed to construct terminal; falling back to unsupport
The following works for me (mostly, see note at bottom):
<cygwin home>\bin
folder then it's ready to use, else it can be installed through the typical cygwin package selection from the setup.exe.Options...
-> Keys
, and make sure Send Backspace as ^H
is checked. This will allow the REPL to correctly interpret backspaces.For just running the Scala REPL that should be all you need, but attempting to run sbt console
can still produce that exception. To get past that, run sbt
without any arguments to get to the sbt prompt. From there execute:
eval System.setProperty("jline.terminal", "scala.tools.jline.UnixTerminal")
then
console
or, as a single command (with both semi-colons being important):
; eval System.setProperty("jline.terminal", "scala.tools.jline.UnixTerminal") ; console
From what I can tell, this is caused at least in part by the Scala REPL and the sbt prompt using incompatible versions of JLine. In particular, it looks like the Scala REPL created their own wrappers around the library and are using that while sbt is using the JLine library directly.
One limitation that I continue to run into is that the REPL wraps at column 80 even if the shell window has more horizontal space. Not only that, but when the REPL wraps like this it overwrites the same line rather than advancing to the next, and pulling long lines from history ends up pushing the cursor above the line you're actually editing.