I'm using clap to parse arguments. I want to use the single dash (-) and more than one character in the argument, like -Fmin 1. Adding long("Fmin") gives me that but with two dashes (--).
I'm aware that using a single dash and single character together is the norm. But is it possible to have clap use more than a single character when using the short() form? Or override the long-form so it defaults to a single dash?
let matches = App::new("clap")
.arg(Arg::with_name("Fmin")
.required(false)
.takes_value(true)
.short("Fmin")
.multiple(false)
.possible_values(&["min"])
)
.get_matches();
is it possible to have clap use more than a single character when using the short() form? Or override the long-form so it defaults to a single dash?
Judging by this issue, single-hyphen long options are not yet supported by clap.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With