-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
It doesn't occur often in coreutils, but sometimes options conflict. They might even conflict with themselves. This is tricky to support while also maintaining good error messages.
One design could be to define conflict groups (leaving out some boilerplate in the example):
enum Arg {
#[arg("--foo", conflict_group="foobar")]
Foo,
#[arg("--bar", conflict_group="foobar")]
Bar,
}"foobar" is a key into some hashset of options that have been set.
An example of conflicting options are cut's --fields, --bytes and --characters.
Metadata
Metadata
Assignees
Labels
No labels