-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
A-parsingArea: Parser's logic and needs it changed somehow.Area: Parser's logic and needs it changed somehow.C-enhancementCategory: Raise on the bar on expectationsCategory: Raise on the bar on expectationsS-waiting-on-decisionStatus: Waiting on a go/no-go before implementingStatus: Waiting on a go/no-go before implementing
Description
Please complete the following tasks
- I have searched the discussions
- I have searched the open and rejected issues
Clap Version
master
Describe your use case
Additionally to #6079, the cargo --features
parser eliminates empty arguments that were produced by splitting, therefore not causing an error for, e.g., --features a,b,
. If this can be done declaratively with clap (and #6079), then cargo can remove the custom parser and use a built-in solution. This also can be used by any other CLI, including dx
, to offer a very flexible and friendly way to pass multiple arguments to the same flag.
Describe the solution you'd like
Something like ignore_empty_delimited_values(true)
. It probably should only apply to Vec<_>
flags. Not sure how useful it would be for Option<_>
ones (--flag ''
).
Alternatives, if applicable
Using custom parser, like cargo
does.
Additional Context
No response
Metadata
Metadata
Assignees
Labels
A-parsingArea: Parser's logic and needs it changed somehow.Area: Parser's logic and needs it changed somehow.C-enhancementCategory: Raise on the bar on expectationsCategory: Raise on the bar on expectationsS-waiting-on-decisionStatus: Waiting on a go/no-go before implementingStatus: Waiting on a go/no-go before implementing