Skip to content

Arg::conflicts_with

since 0.1.0

This argument is mutually exclusive with the specified argument.

name = "prog"
[args]
cfg = { long = "config", action = "set", conflicts-with = "debug" }
debug = { long = "debug", action = "set-true" }
Terminal window
prog --debug --config file.conf
Terminal window
error: the argument '--debug' cannot be used with '--config <cfg>'
Usage: prog --debug
For more information, try '--help'.