Skip to content
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

Ensure external help options are mentioned in short help where available #2808

Merged

Conversation

Gedochao
Copy link
Contributor

Fixes #2798

scala-cli -h
Usage: scala-cli <COMMAND>
Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run and test your Scala code.

Main commands:
  clean                  Clean the workspace.
  compile                Compile Scala code.
  doc                    Generate Scaladoc documentation.
  fmt, format, scalafmt  Formats Scala code.
  repl, console          Fire-up a Scala REPL.
  run                    Compile and run Scala code.
  test                   Compile and test Scala code.

Miscellaneous commands:
  version  Prints the version of the Scala CLI and the default version of Scala.

Other commands:
  config                                        Configure global settings for Scala CLI.
  help                                          Print help message
  install completions, install-completions      Installs Scala CLI completions into your shell
  setup-ide                                     Generates a BSP file that you can import into your IDE.
  shebang                                       Like `run`, but handier for shebang scripts.
  uninstall                                     Uninstalls Scala CLI.
  uninstall completions, uninstall-completions  Uninstalls Scala CLI completions from your shell.
  update                                        Updates Scala CLI.

See 'scala-cli <command> --help' to read about a specific subcommand. To see full help run 'scala-cli <command> --help-full'.

To use launcher options, specify them before any other argument.
For example, to run another Scala CLI version, specify it with the '--cli-version' launcher option:
  scala-cli --cli-version <version> args

Launcher options:
  --cli-version nightly|version  Set the Scala CLI version
  --power                        Allows to use restricted & experimental features

Scala options:
  --scalac-help, --help-scalac        Show help for scalac. This is an alias for --scalac-option -help
  --scalac-verbose, --verbose-scalac  Turn verbosity on for scalac. This is an alias for --scalac-option -verbose

Help options:
  --help-js                    Show options for ScalaJS
  --help-native                Show options for ScalaNative
  --help-doc, --help-scaladoc  Show options for Scaladoc
  --help-repl, --repl-help     Show options for Scala REPL
  --help-fmt, --help-scalafmt  Show options for Scalafmt

When no subcommand is passed explicitly, an implicit subcommand is used based on context:
  - if the '--version' option is passed, it prints the 'version' subcommand output, unmodified by any other options
  - if any inputs were passed, it defaults to the 'run' subcommand
  - additionally, when no inputs were passed, it defaults to the 'run' subcommand in the following scenarios:
    - if a snippet was passed with any of the '--execute*' options
    - if a main class was passed with the '--main-class' option alongside an extra '--classpath'
  - otherwise, if no inputs were passed, it defaults to the 'repl' subcommand

@Gedochao Gedochao merged commit bbb9a71 into VirtusLab:main Mar 26, 2024
69 checks passed
@Gedochao Gedochao deleted the ux/promote-integrations-help-options branch March 26, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest --scalac-help prominently
2 participants