Command::visible_short_flag_alias
visible_short_flag_alias
Section titled “visible_short_flag_alias ”Add an alias, which functions as “visible” short flag subcommand.
Example
Section titled “Example”name = "myprog"[[subcommands]]name = "test"short-flag = 't'visible-short-flag-alias = 'd'[subcommands.args]input = { required = false, help = "the file to add" }
name: myprogsubcommands:- name: test short-flag: t visible-short-flag-alias: d args: input: required: false help: the file to add
{ "name": "myprog", "subcommands": [ { "name": "test", "short-flag": "t", "visible-short-flag-alias": "d", "args": { "input": { "required": false, "help": "the file to add" } } } ]}
prog -d file.txt
Output
Section titled “Output”claptrap__subcommand='test'claptrap_test_input='file.txt'