Running Scala CLI without any arguments should start a REPL
See original GitHub issueIs your feature request related to a problem? Please describe.
This issue was created based on the comments in Scala CLI SIP.
The current scala
command starts repl with no arguments provided but with scala-cli repl
subcommand is needed. I think we should change the behaviour to match what scala
is doing now: running repl when no commands are provided.
Describe the solution you’d like
When running scala-cli
without any command, a reply should be started.
Additional context
We would need to find a way to display help for the whole scala-cli' tool. With the default changed, user running
scala-cli --helpmay expect either help for the whole
scala-clior the
repl` command. I can see 2 options:
scala-cli --help
prints the help for the whole tool with the mention that to see a help dedicated forrepl
command runscala-cli repl --help
scala-cli --help
prints the help forrepl
command with the mention that to see the whole help run e.g.scala-cli --help --all
I am personally prefer the former mechanism.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Getting started | Scala CLI
In this article we show how to use Scala CLI to create a basic script, followed by small project with features like dependencies,...
Read more >Scala CLI (Compiling and Running Code) | alvinalexander.com
Use this Scala CLI command to start the Scala REPL: ... is implicitly made available to you, so you can access command-line arguments....
Read more >The Scala REPL | Scala Book
The Scala REPL (“Read-Evaluate-Print-Loop”) is a command-line interpreter that you use as a “playground” area to test your Scala code. To start a...
Read more >How do I set command line arguments for my REPL - Replit
Press Ctrl-Shift-P inside your repl and then "Open Shell". This will open a normal shell inside your repl directory, where you can run...
Read more >Introduction to Scala REPL - Baeldung
Scala REPL is a command-line tool for the expression, evaluation, ... To start a Scala REPL session, we need to execute the “scala”...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI we already have a ticket for this: https://github.com/VirtusLab/scala-cli/issues/1240
It would be good to make sure that it also works as before with scala-cli to give the
-S
or--scala-version
options (and perhaps other relevant options to scala-cli). So instead of:We can write just: