xitrum-framework/scalive

Add JLine for keyboard navigation

Closed this issue · 7 comments

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.

@georgeOsdDev

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.

@georgeOsdDev

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.