Skip to content

Command::subcommands

since 0.1.0

Adds multiple subcommands to the list of valid possibilities.

name = "myprog"
[args]
arg1 = {}
[[subcommands]]
name = "subcommand"
about = "a sub command"
[subcommands.args]
arg2 = {}
[[subcommands.subcommands]]
name = "nested"
about = "A nested sub command"
[subcommands.subcommands.args]
arg3 = { long = "arg3", action = "append" }
[[subcommands]]
name = "subcommand2"
about = "another sub command"
[subcommands.args]
arg4 = {}
Terminal window
myprog subcommand nested --arg3 one --arg3 two
Terminal window
claptrap__subcommand='subcommand::nested'
claptrap_subcommand_nested_arg3=('one' 'two')