-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add support for the :sh
command in the REPL
#21657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I started looking into this and noticed that the Scala 2 implementation returns a scala.tools.nsc.interpreter.shell.ProcessResult object. An alternative that also works outside of the REPL is scala.sys.process: ➜ ~ scala -S 3.6.2
Jan 09, 2025 4:49:11 PM org.jline.utils.Log logr
WARNING: The terminal provider jna has been deprecated, check your configuration. This warning can be disabled by setting the system property org.jline.terminal.disableDeprecatedProviderWarning to true.
Welcome to Scala 3.6.2 (21.0.5, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> import scala.sys.process.*
scala> "scala-cli --help".!
Usage: scala-cli <COMMAND>
Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test and package your Scala code.
... What would be the advantage of having a specific |
I'd forgotten |
What you you think @Gedochao:
|
@mbovel I'll raise it on core today |
The conclusions is that we should deprecate it in Scala 2, which already has the ticket (above) and Scala 3 should have a proper error message on how to work around the missing feature. |
@mbovel calling |
Fixes scala#21657 [Cherry-picked 9181b55]
The
:sh
command was (and is) supported by the Scala 2 REPL, while it is visibly absent in Scala 3.The text was updated successfully, but these errors were encountered: