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

Fix help message for --version and --help #23

Merged
merged 3 commits into from
Jul 24, 2022

Conversation

wx257osn2
Copy link
Contributor

Current structopt generates a help message like below:

USAGE: my_app [FLAGS] [OPTIONS] config_file files

FLAGS:
    -v, --verbose

OPTIONS:
    -b, --bind-address <bind_address>
    -l, --log-level <log_level>
    -u, --user <user>
    -h, --help <help>
    -v, --version <version>

ARGS:
    config_file
    files

However, it doesn't accept -v as --version because user-declared options like -v as --verbose are preferred. --help is in the same situation.

This PR fixes the help message if -v or -h doesn't work as --version or --help .

@p-ranav p-ranav merged commit 422c2e2 into p-ranav:master Jul 24, 2022
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.

2 participants