Is there a way to accept either of two flags. only one valid at a time #1738
-
Clap version2.33.0 What's wrongIs there a way for app to accept either of two flags. If one is given app shouldn't accept second, vice versa. App::new("tool")
.arg(Arg::with_name("primary"))
.arg(Arg::with_name("secondary")) Here imagine tool can either act as primary node or secondary node. If it's started with
it shouldn't accept |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can use either
|
Beta Was this translation helpful? Give feedback.
You can use either
conflicts_with
orArgGroup
: