Represents a command.
Thrown when program definition contains error.
Represents program.
1 auto program = new Program("grit") 2 .add(new Flag("v", "verbose", "verbosity")) 3 .add(new Command("branch", "branch management") 4 .add(new Command("add", "adds branch") 5 .add(new Argument("name")) 6 ) 7 .add(new Command("rm", "removes branch") 8 .add(new Argument("name")) 9 ) 10 ) 11 ;
Command, Program, parse
Program data model
This module along with commandr.option contains all types needed to build your program model - program options, flags, arguments and all subcommands.
After creating your program model, you can use it to: - parse the arguments with parse or parseArgs - print help with printHelp or just the usage with printUsage - create completion script with createBashCompletionScript