Decorator to mark function to be used for command line processing.
All arguments are optional:
- options: options in format described in docs. If not supplied, will be determined from function.
- usage: usage string for function, replaces %name with name of program or subcommand. In case if it’s subcommand and %name is not present, usage is prepended by name
- name: used for multiple subcommands. Defaults to wrapped function name
- shortlist: if command should be included in shortlist. Used only with multiple subcommands
- hide: if command should be hidden from help listing. Used only with multiple subcommands, overrides shortlist
Dispatch command arguments based on subcommands.
cmdtable format description:
{'name': (function, options, usage)}