-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update clap to v4 #15
Conversation
Thank you for this. To include version and author, it seems like #[command(
author,
version,
about,
max_term_width = 100,
help_template = "\
{before-help}{name} {version}
{author-with-newline}{about-with-newline}
{usage-heading} {usage}
{all-args}{after-help}"
)] I found this by looking at the docs for clap 4.1.8, since the documentation for |
Nice find! I wonder if that was an intentional change by Either way that should work fine. You can push a commit for it if ya want since I'll be AFK for the rest of the day |
I missed this note under
|
@CosmicHorrorDev I just pushed a change, which adds the version and author and minor tweaks to the help message. |
Thanks! It all LGTM 👍 |
Yes, though I can't say I approve. When someone writes |
I'm in the same boat. It seems incredibly uncommon that someone wants to set the author info for something other than the help message I know that |
Yes, I might do that. The code looks good, thank you for the contribution 🙂 |
I've got more contributions planned too 😁 I'll make sure to open issues beforehand though. No worries |
I appreciate that! I just hope it doesn't keep you from writing blog posts 😆 |
Resolves #13
This updates clap to v4 and switches to the derive API. It looks like the flag order got changed to the declaration order, so it's possible you may want that changed to match, but other than that everything seems more or less the same
I can't seem to get the author or version to set in the help message no matter what I try (enabling the cargo command, explicitly setting it, using
clap::crate_authors!()
, etc), so I'll have to dig into that some moreThe help text before and after