-
Notifications
You must be signed in to change notification settings - Fork 132
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
Running Scala CLI without any arguments should start a REPL #1249
Comments
I agree - it would also bee good if all of these gave the help text for the whole tool:
Even if it is not "consistent" to have them all it is great UX for the aspect of discoverability, as we cannot assume that at novice knows the boundaries within what input is deemed "consistent" :) |
CLI tools typically print the help text on bad usage. We can keep only the "traditional" |
It would be good to make sure that it also works as before with scala-cli to give the
We can write just:
|
FYI we already have a ticket for this: #1240 |
Isn't there's a friction point with the project/file(s) being passed to I suspect that supporting these positional args at the root level will create ambiguities with the subcommands. Or https://scala-cli.virtuslab.org/docs/commands/repl There is a fundamental collision issue of project names (e.g., "test") and subcommands if you try to load positional args at the root level. This currently exists with There's a bit more surface area and functionality of It might be useful to try to embrace the subcommand design of |
Yes, the sub-command UI is very clear and consistent once you get it. What I mean is that some limited selected things (starting repl, getting help, checking version) are special-cased at top-level to make it simple for beginners and (somewhat) backward compatible with the old scala command. Other stuff from the old scala command that are too much interfeering with the sub-command-idea should give good error hints that are implemented also with those used to the old scala command in mind, if possible. |
Is 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-clirepl
subcommand is needed. I think we should change the behaviour to match whatscala
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.
The text was updated successfully, but these errors were encountered: