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

Enhancement: Need a global --help (-h) flag to show the help information shown when the 'help` command is selected #71

Open
kcq opened this issue Oct 27, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kcq
Copy link
Contributor

kcq commented Oct 27, 2024

Right now running mint -h or mint --help prints this error: Incorrect Usage: flag: help requested. We need to handle these use cases properly. For that we need to define an extra global flag to handle --help (with -h as an alias) and print the same info when mint help is typed. This would be similar to what happens with the global --version flag.

@kcq kcq added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Oct 27, 2024
@Bharadwajshivam28
Copy link

Bharadwajshivam28 commented Nov 1, 2024

Hey @kcq now when I run mint -h or mint --help I get the same result as mint help but it gives incorrect flag. so we need to define an extra global flag to handle --help with -h as an alias. If it good to go then I am taking this issue.

I think the file to handle this is vendor/github.com/spf13/pflag/flag.go

@kcq
Copy link
Contributor Author

kcq commented Nov 1, 2024

The spf13/pflag library is an indirect dependency and it's not used by the app itself. The CLI commands and flags are handled with the urfave/cli library.

Feel free to work on the enhancement. If you have any questions add them here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants