Skip to content

Command::visible_short_flag_alias

since 0.1.0

Add an alias, which functions as “visible” short flag subcommand.

name = "myprog"
[[subcommands]]
name = "test"
short-flag = 't'
visible-short-flag-alias = 'd'
[subcommands.args]
input = { required = false, help = "the file to add" }
Terminal window
prog -d file.txt
Terminal window
claptrap__subcommand='test'
claptrap_test_input='file.txt'