Arg::overrides_with_all
overrides_with_all
Section titled “overrides_with_all ”Sets multiple mutually overridable arguments by name.
Example
Section titled “Example”name = "prog"[args]flag = { short = 'f', long = "flag", action = "set-true", help = "some flag", conflicts-with = "color" }debug = { short = 'd', long = "debug", action = "set-true", help = "other flag" }color = { short = 'c', long = "color", action = "set-true", help = "third flag", overrides-with-all = ["flag", "debug"] }
name: progargs: flag: short: f long: flag action: set-true help: some flag conflicts-with: color debug: short: d long: debug action: set-true help: other flag color: short: c long: color action: set-true help: third flag overrides-with-all: - flag - debug
{ "name": "prog", "args": { "flag": { "short": "f", "long": "flag", "action": "set-true", "help": "some flag", "conflicts-with": "color" }, "debug": { "short": "d", "long": "debug", "action": "set-true", "help": "other flag" }, "color": { "short": "c", "long": "color", "action": "set-true", "help": "third flag", "overrides-with-all": [ "flag", "debug" ] } }}
prog -f -d -c
Output
Section titled “Output”claptrap_color='true'claptrap_flag='false'claptrap_debug='false'