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

Ability to specify posix '-V', and modern 'version', 'help' for version and help #661

Open
coolaj86 opened this issue Aug 20, 2024 · 0 comments

Comments

@coolaj86
Copy link

coolaj86 commented Aug 20, 2024

--version, -V, version

The posix tradition has been to use -V as short for --version (but -v is reserved for --verbose or sometimes --inverse), so naturally one of the first things I tried when I realized it was missing was to specify that - but there's no versionNames to match helpNames.

Many modern commands also use version, as an argument, without the -- flag prefix.

I'd like to be able to support all three.

--help, help, (no arguments)

Also, help is traditionally --help (with -h reserved for --human-readable), but many modern programs use help (or no arguments).

I'd like to be able to support --help, help, and no arguments simultaneously.

Can't override the defaults

Since I can't add the options I want, I thought perhaps I could disable the built-in help flag and parse my own, but doesn't seem to be working as expected either.

I would love it if this would either support the conventional help and version flags / arguments by way of options, or at least allow me to disable the built-in so that I can provide it in the most common configurations in the "happy path" configuration.

Sort-of Workaround

I think it's pretty reasonable to limit help to just --help and having help as a subcommand, and I could do the same with --version and version, but that doesn't give me -V.

I'm poking through the documentation to see if there's a way to just use the arguments parser and table generator with custom control-flow...

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

1 participant