Command::visible_aliases
visible_aliases
Section titled “visible_aliases ”Sets multiple visible aliases to this subcommand.
Example
Section titled “Example”name = "myprog"[[subcommands]]name = "test"visible-aliases = ["do-stuff", "tests"][subcommands.args]input = { required = false, help = "the file to add" }
name: myprogsubcommands:- name: test visible-aliases: - do-stuff - tests args: input: required: false help: the file to add
{ "name": "myprog", "subcommands": [ { "name": "test", "visible-aliases": [ "do-stuff", "tests" ], "args": { "input": { "required": false, "help": "the file to add" } } } ]}
prog do-stuff config.txt
Output
Section titled “Output”claptrap__subcommand='test'claptrap_test_input='config.txt'