Command::visible_short_flag_aliases
visible_short_flag_aliases
Section titled “visible_short_flag_aliases ”Add aliases, which function as visible short flag subcommands.
Example
Section titled “Example”name = "myprog"[[subcommands]]name = "test"visible-short-flag-aliases = ['a', 'b', 'c'][subcommands.args]input = { required = false, help = "the file to add" }
name: myprogsubcommands:- name: test visible-short-flag-aliases: - a - b - c args: input: required: false help: the file to add
{ "name": "myprog", "subcommands": [ { "name": "test", "visible-short-flag-aliases": [ "a", "b", "c" ], "args": { "input": { "required": false, "help": "the file to add" } } } ]}
prog -a file.txt
Output
Section titled “Output”claptrap__subcommand='test'claptrap_test_input='file.txt'