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