We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
autoprintHelpAndExit
--help
When using multiple main methods --help is not automatically detected if passed to a subcommand.
For example:
object Main { @main def foo(@arg() bar: Boolean ) = {} @main def baz() = {} def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args.toSeq) }
When run with ./example foo --help will error instead of printing the help message for foo:
./example foo --help
foo
Missing argument: --bar <bool> Unknown argument: "--help" Expected Signature: foo --bar <bool>
The --help arg will also get swallowed by a Leftover[String] or String* and the command will run instead of immediately exiting:
Leftover[String]
String*
object Main { @main def foo(@arg() bar: String*) = { println(bar) } @main def bar() = {} def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args.toSeq) }
When run with ./example foo --help outputs: List(--help)
List(--help)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
When using multiple main methods
--help
is not automatically detected if passed to a subcommand.For example:
When run with
./example foo --help
will error instead of printing the help message forfoo
:The
--help
arg will also get swallowed by aLeftover[String]
orString*
and the command will run instead of immediately exiting:When run with
./example foo --help
outputs:List(--help)
The text was updated successfully, but these errors were encountered: