Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-1067

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

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Repl / Interpreter
    • Labels:
    • Environment:

      jline

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                washburn Geoffrey Alan Washburn
              • Votes:
                4 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated: