Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Scala 2.11.6
    • Fix Version/s: None
    • Component/s: Repl / Interpreter
    • Labels:
      None

      Description

      If a SO answer is in REPL transcript form, people want to be able to copy/paste it to their REPL and save the session.

      That's not currently possible, although the transcript can be edited from history (but they could have pasted directly to their editor at that point).

      A session is not exactly valid code, so it would be nice if save command had an option to fix things up a bit.

      scala> scala> import PartialFunction._
       
      // Detected repl transcript paste: ctrl-D to finish.
       
      import PartialFunction._
       
      scala> // more transcript and ctrl-D
      // Replaying 3 commands from transcript.
       
      scala> import PartialFunction._
      import PartialFunction._
       
      scala> // more
       
       
      scala> :save useful.script
      No replay commands in session
       
      scala> "abc"
      res2: String = abc
       
      scala> .length
      res3: Int = 3
       
      scala> :save useful.script
      

      The script from the last commands looks like:

      "abc"
      res2.length
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              apm A. P. Marki
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: