Skip to content

Add support for the :paste command in the REPL #21660

Open
@Gedochao

Description

@Gedochao

The :paste command was (and is) supported by the Scala 2 REPL, while it is visibly absent in Scala 3.

scala -S 2.13
Welcome to Scala 2.13.15 (OpenJDK 64-Bit Server VM, Java 17).
Type in expressions for evaluation. Or try :help.
scala> :help
All commands can be abbreviated, e.g., :he instead of :help.
(...)
:paste [-raw] [path]     enter paste mode or paste a file
(...)
scala> :paste
// Entering paste mode (ctrl-D to finish)

println("I")
println("paste")
println("stuff")

// Exiting paste mode... now interpreting.
I
paste
stuff

scala> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions