-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Enhance help text generation #112
Comments
Help for subcommands could e.g. work like this:
|
Using the following function:
we can produce, from e.g. this table:
|
Sorry I wasn't done, but I hit "Comment" accidentally. The options can already be formatted using |
Sounds great and is probably good enough for most. Thanks for considering this topic! |
Printing help text is currently facilitated using functions such as
format-opts
andformat-table
, which might suffice for simple applications. But it quickly gets complicated when we have layers of nested commands and subcommands which have their own opts and args.Given a spec and args, we should be able to generate help text using a single function call.
Additionally, we could consider including
--help
or-h
as implicit opts for every command and subcommand. Running a command with missing opts and/or args could result in automatically printing help text. cli-matic handles this well.The text was updated successfully, but these errors were encountered: