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

pr: use clap to handle help & version #3904

Merged

Conversation

cakebaker
Copy link
Contributor

This PR let's clap handle help and version, and removes the deprecated AppSettings::NoAutoHelp and AppSettings::NoAutoVersion.

@tertsdiepraam
Copy link
Member

tertsdiepraam commented Sep 5, 2022

This is technically incompatible with GNU pr, because they don't accept -h and -v, but only the long options. I don't really mind that much in this case, though. If we want 100% compat, then we need disable_help_flag and ArgAction::Help on the custom flag (and the same for version).

@cakebaker
Copy link
Contributor Author

Hm, at least on my machine clap doesn't use -h for help because -h is already defined for something else (the CICD / Binary sizes check, however, fails because of that).

Copy link
Member

@tertsdiepraam tertsdiepraam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completion generation is failing

@cakebaker cakebaker force-pushed the pr_use_clap_for_help_and_version branch from 63b7634 to ea55b19 Compare September 12, 2022 08:41
@cakebaker cakebaker force-pushed the pr_use_clap_for_help_and_version branch from ea55b19 to ebbf8ad Compare September 12, 2022 13:28
@tertsdiepraam tertsdiepraam merged commit 9ce600f into uutils:main Sep 25, 2022
@tertsdiepraam
Copy link
Member

Works as a charm now! Thanks for proving me wrong :)

@cakebaker cakebaker deleted the pr_use_clap_for_help_and_version branch September 26, 2022 05:13
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.

None yet

2 participants