mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
85ad452c9b
In clap v3, `require_value_delimiter` activated an alternative parse mode where - `multiple_values` meant "multiple values within a single arg" - `number_of_values` having no parse impact, only validation impact - `value_names` being delimited values For unbounded `number_of_values`, this is exactly what `value_delimiter` provides. The only value is if someone wanted `value_name` to be `<file1>,<file2>,...` which can be useful and we might look into adding back in. Alternatively, this could be used for cases like key-value pairs but that has issues like not allowing the delimiter in the value which might be ok in some cases but not others. We already instead document that people should instead use `ValueParser` for this case. In removing this, we remove points of confusion at how the different multiple values and delimited value calls interact with each other. I know I would set `require_value_delimiter(true).multiple_values(true)` when it turns out all I needed was `value_delimiter(',')`. This also reduces the API surface area which makes it easier to discover what features we do provide. While this isn't big, this is also yet another small step towards reducing binary size and compile times. |
||
---|---|---|
.. | ||
builder | ||
derive | ||
derive_ui | ||
ui | ||
derive_ui.rs | ||
examples.rs | ||
macros.rs | ||
ui.rs |