Skip to content

Command::subcommand_required

since 0.1.0

If no subcommand is present at runtime, error and exit gracefully.

name = "myprog"
subcommand-required = true
[[subcommands]]
name = "test"
Terminal window
myprog
Terminal window
error: 'myprog' requires a subcommand but one was not provided
[subcommands: test, help]
Usage: myprog <COMMAND>
For more information, try '--help'.