Command::visible_long_flag_aliases
visible_long_flag_aliases
Section titled “visible_long_flag_aliases ”Add aliases, which function as visible long flag subcommands.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”name = "myprog"[[subcommands]]name = "test"long-flag = "test"visible-long-flag-aliases = ["testing", "testall", "test_all"][subcommands.args]input = { required = false, help = "the file to add" }
name: myprogsubcommands:- name: test long-flag: test visible-long-flag-aliases: - testing - testall - test_all args: input: required: false help: the file to add
{ "name": "myprog", "subcommands": [ { "name": "test", "long-flag": "test", "visible-long-flag-aliases": [ "testing", "testall", "test_all" ], "args": { "input": { "required": false, "help": "the file to add" } } } ]}
prog --testing file.txt
Output
Section titled “Output”claptrap__subcommand='test'claptrap_test_input='file.txt'
Example 2
Section titled “Example 2”name = "myprog"[[subcommands]]name = "test"long-flag = "test"visible-long-flag-aliases = ["testing", "testall", "test_all"][subcommands.args]input = { required = false, help = "the file to add" }
name: myprogsubcommands:- name: test long-flag: test visible-long-flag-aliases: - testing - testall - test_all args: input: required: false help: the file to add
{ "name": "myprog", "subcommands": [ { "name": "test", "long-flag": "test", "visible-long-flag-aliases": [ "testing", "testall", "test_all" ], "args": { "input": { "required": false, "help": "the file to add" } } } ]}
prog --help
Output
Section titled “Output”Usage: prog [COMMAND]
Commands: test, --test [aliases: --testing, --testall, --test_all] help Print this message or the help of the given subcommand(s)
Options: -h, --help Print help