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

Add --help support for subcommands #178

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jnowjack-lucidchart
Copy link

Fixes #174

Not sure if this would be the best way to support the feature, but it was my attempt to do so.

./mill example.hello2 --help output is left unchanged:

$ ./mill example.hello2 --help
[108/108] example.hello2.run
[108] Available subcommands:
[108]
[108]   foo
[108]     --bool          Example flag
[108]     -f --foo <str>  String to print repeatedly
[108]     --my-num <int>  How many times to print string
[108]
[108]   bar
[108]     -i <int>
[108]     -s <str>        Pass in a custom `s` to override it
[108]

./mill example.hello2 foo --help prints out the help message for foo:

$ ./mill example.hello2 foo --help
[108/108] example.hello2.run
[108] foo
[108]   --bool          Example flag
[108]   -f --foo <str>  String to print repeatedly
[108]   --my-num <int>  How many times to print string
[108]

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.

autoprintHelpAndExit doesn't print the help message and exit when --help is passed to a subcommand
1 participant