Arg::conflicts_with
conflicts_with
Section titled “conflicts_with ”This argument is mutually exclusive with the specified argument.
Example
Section titled “Example”name = "prog"[args]cfg = { long = "config", action = "set", conflicts-with = "debug" }debug = { long = "debug", action = "set-true" }
name: progargs: cfg: long: config action: set conflicts-with: debug debug: long: debug action: set-true
{ "name": "prog", "args": { "cfg": { "long": "config", "action": "set", "conflicts-with": "debug" }, "debug": { "long": "debug", "action": "set-true" } }}
prog --debug --config file.conf
Output
Section titled “Output”error: the argument '--debug' cannot be used with '--config <cfg>'
Usage: prog --debug
For more information, try '--help'.