How to show author and version in help output? #5316
-
I currently use clap derive like so: #[derive(Parser)]
#[clap(version, about, author)]
struct Cli { with these features enabled: clap = { version = "4.4.7", default-features = false, features = ["std", "help", "cargo", "derive", "error-context", "string", "color", "usage", "wrap_help"] } Is it possible to enable a clap option somewhere so that the author and/or version gets printed at the beginning (or end, if that is just possible) of the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
These were shown by default until #4160 (see also #4132). The changelog entry for this (and that parent issue) mention the way to bring it back
In fact the example for That isn't too discoverable. Looking deeper, it seems we mention it on |
Beta Was this translation helpful? Give feedback.
These were shown by default until #4160 (see also #4132).
The changelog entry for this (and that parent issue) mention the way to bring it back
In fact the example for
Command::help_template
has the old template in it for you to be able to copy/paste.That isn't too discoverable. Looking deeper, it seems we mention it on
Command::author
but most derive users don't make it to that withauthor
being documented within the derive reference. I'll mirror that note within the derive reference. Looks likeauthor
is used in parts of the tutorial; instead of docu…