Skip to content

ArgGroup::conflicts_with_all

since 0.1.0

Specify arguments or groups that must not be present when this group is.

name = "myprog"
[groups]
req_flags = { args = ["flag", "color"], conflicts-with-all = ["debug", "verb"] }
[args]
flag = { short = 'f', action = "set-true" }
color = { short = 'c', action = "set-true" }
debug = { short = 'd', action = "set-true" }
verb = { short = 'v', action = "set-true" }
Terminal window
myprog -c -v
Terminal window
error: the argument '-c' cannot be used with '-v'
Usage: myprog -c
For more information, try '--help'.