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
REPL: -Djline.WindowsTerminal.directConsole=false does not work on Windows #7061
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7061?orig=1
|
@adriaanm said: |
@adriaanm said: |
Tony Sloane (asloane) said: My plugin does not currently work on Windows because the Scala REPL doesn't see any input that is redirected in from a file (https://bitbucket.org/inkytonik/scalaworksheet/issue/5/scalaworksheet-doesnt-work-on-windows). Setting the jline.WindowsTerminal.directConsole to false enables JLine to see redirected stdin on Windows (for the example JLine program). But due to the issue reported here, that fix doesn't work for the Scala REPL. I think it's likely that moving to vanilla JLine 2 will fix the problem for Scala 2.11. It would be great to also see a fix back-ported to Scala 2.10, since a lack of one means that my plugin will never work with anything earlier than 2.11 on Windows. |
@retronym said: We're focussed on 2.11 at the moment. We might accept a pull request to backport the Jline fix to 2.10 if if is clearly low risk (this seems to fall into that category, unlike most JLine changes.) |
Tony Sloane (asloane) said: |
Tony Sloane (asloane) said: |
When starting REPL having set
C:>set JAVA_OPTS=-Djline.WindowsTerminal.directConsole=false
jline still uses direct console mode.
My fix was to make a small change to scala.tools.jline.WindowsTerminal such that the absence of \ -Djline.WindowsTerminal.directConsole is the equivalent of \ -Djline.WindowsTerminal.directConsole=true rather than it being \ -Djline.WindowsTerminal.directConsole=false \ and then to honor the setting less conditionally in the code.
Interestingly the version of jline in sbt does not seem to have this problem.
See lines marked "******** NS ********" in attached source file
The text was updated successfully, but these errors were encountered: