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

There is no way to manually print the help or usage text for a specific subcommand #135

Closed
alexflint opened this issue Jan 2, 2021 · 3 comments

Comments

@alexflint
Copy link
Owner

Currently, p.WriteHelp always writes the help for the top-level command, meaning there is no way to manually print the help message for a specific subcommand.

We could expose the cmd struct as Subcommand and add WriteHelpForSubcommand and WriteUsageForSubcommand to the Parser struct.

@samratjha96
Copy link

@alexflint This would be great. Just encountered this where I wanted to write a description and help text for the subcommand as a whole. Exposing the same capabilities to Subcommand as the top level command would be great

@alexflint
Copy link
Owner Author

Thanks for the note, @samratjha96. Just waiting to have some time to do this.

@alexflint
Copy link
Owner Author

Fixed in #156

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

No branches or pull requests

2 participants