gsmafra gsmafra - 1 month ago 8
Linux Question

History/partial search with up-arrow on scala shell

How can I make the scala interactive shell program behave this way (using the up-arrow to go to the last command if I haven't typed anything or go to the last command given in the shell beginning with what I typed) instead of the reverse-i-search?


The Scala REPL uses JLine for readline functionality, and current versions support these .inputrc mappings:

## arrow up
## arrow down

and they work as you describe, enter a line prefix then up-arrow.

Probably the clunky :h? command can be retired. Or I guess that finds text anywhere on a line. :history line numbers are still useful for :edit 2463+10.