Skip to content

Interpreter (aka REPL) history should be by statement, not by textual line. #1067

Closed
@scabug

Description

@scabug

If you write the following in the interpreter:

scala> trait A {
     |   val x : String
     | }
defined trait A

And use up-arrow (or whatever your particular binding is), you get

scala> }

Which is nearly useless. The history should instead group an entire statement. For example, in zsh, if you write:

% for i in *.xml
for> wc -c $$i
8866 build.examples.xml
46544 build.xml

Then hitting up arrow gives you:

% for i in *.xml
wc -c $$i

rlwrap is not smart enough to either, it would probably require more configurability than is reasonable for it to offer, so we should fix the interaction with jline to get the more useful behavior.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions