Arg::display_order
display_order
Section titled “display_order ”Allows custom ordering of args within the help message.
Example
Section titled “Example”name = "prog"[args]boat = { short = 'b', long = "boat", action = "set", display-order = 0, help = "Some help and text" }airplane = { short = 'a', long = "airplane", action = "set", display-order = 0, help = "I should be first!" }custom-help = { short = '?', action = "help", display-order = 100, help = "Alt help" }
name: progargs: boat: short: b long: boat action: set display-order: 0 help: Some help and text airplane: short: a long: airplane action: set display-order: 0 help: I should be first! custom-help: short: '?' action: help display-order: 100 help: Alt help
{ "name": "prog", "args": { "boat": { "short": "b", "long": "boat", "action": "set", "display-order": 0, "help": "Some help and text" }, "airplane": { "short": "a", "long": "airplane", "action": "set", "display-order": 0, "help": "I should be first!" }, "custom-help": { "short": "?", "action": "help", "display-order": 100, "help": "Alt help" } }}
prog --help
Output
Section titled “Output”Usage: prog [OPTIONS]
Options: -a, --airplane <airplane> I should be first! -b, --boat <boat> Some help and text -? Alt help -h, --help Print help