-
Let's say you have this: #[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
pub struct MyParser {
#[arg(long)]
pub foo: u32,
} Running
Is it possible to also show the type? For example:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is an argument parser for another language that does this; I wish I could remember which. If we did this, it could work to fill in similar to However, I'm concerned about
However, the I had considered such a thing in #2683 but held off in #3732. Going to convert this into an issue for further exploration. |
Beta Was this translation helpful? Give feedback.
There is an argument parser for another language that does this; I wish I could remember which.
If we did this, it could work to fill in similar to
[possible values: foo, bar]
in style.However, I'm concerned about
However, the
value_name
fills a similar role and I think it'd be a worthwhile to look into leveraging that.long
andid
are more akin to a field name whilevalue_name
is more akin to the type (in flags, positionals are weird in that they need to convey both). Framing this way, makes me feel like we could have a type associated te…