Open
Description
as discussed with @Gedochao at Scala core meeting today
in reference to e.g. scala/scala3#21657 about Scala 2's :sh
command, but there are probably other such commands as well
if I understand correctly, the idea isn't to slate anything for actual removal from Scala 2, but just have unimplemented-in-3 commands print a one-line warning (on first use in a session, but not again in that session) that the command is unimplemented in Scala 3
and I suggest we also make this distinction show up in :help
, which currently looks like
scala 2.13.16> :help
All commands can be abbreviated, e.g., :he instead of :help.
:help [command] print this summary or command-specific help
:completions <string> output completions for the given string
:imports [name name ...] show import history, identifying sources of names
:implicits [-v] show the implicits in scope
:javap <path|class> disassemble a file or class name
:line <id>|<line> place line(s) at the end of history
:load <path> interpret lines in a file
:paste [-raw] [path] enter paste mode or paste a file
:power enable power user mode
:quit exit the REPL
:replay [options] reset the REPL and replay all previous commands
:require <path> add a jar to the classpath
:reset [options] reset the REPL to its initial state, forgetting all session entries
:save <path> save replayable session to a file
:sh <command line> run a shell command (result is implicitly => List[String])
:settings <options> update compiler options, if possible; see reset
:silent disable/enable automatic printing of results
:type [-v] <expr> display the type of an expression without evaluating it
:kind [-v] <type> display the kind of a type. see also :help kind
:warnings show the suppressed warnings from the most recent line which had any
off the top of my head: I think we could have two sections, the first would be the core commands that both REPLs support, then a second section with the rest