Add JLine for keyboard navigation
Closed this issue · 7 comments
Can you port JLineReader from standard features of Scala?
https://github.com/scala/scala/blob/master/src/repl/scala/tools/nsc/interpreter/JLineReader.scala
I tried looking into why arrow keys don't work; with pure Scala code, line history and navigation works perfectly fine out of the box, but playing with the Java code in Repl.java
didn't have any effect on how the REPL behaved in terms of line history.
Any insight there?
For now, I'll try to merge Oshida's #4 pull request. It provides arrow keys.
It has problem that causes problem to your console keys after the Scalive REPL exits, but that's still a good tradeoff.
In your PR, you added JLine to the client.
I think maybe we can add JLine to the server.
Maybe that will allow us to have console navigation (using arrow keys etc.) and autocomplete.
I'll investigate that approach.
I've finished this feature based on your code.
I could use your code as-is, because it starts an interpreter session on the client side.
I'll release a new version today.
v1.6 with this feature has been released:
https://github.com/xitrum-framework/scalive/releases/tag/1.6
🎉