ShellBinCommand constructor
ShellBinCommand({
- required String name,
- Version? version,
- ArgParser? parser,
- ShellBinCommand? parent,
- String? description,
Shell bin command
Implementation
ShellBinCommand(
{required this.name,
Version? version,
ArgParser? parser,
ShellBinCommand? parent,
String? description}) {
//_onRun = onRun;
_parser = parser;
_description = description;
_version = version;
// read or create
parser = this.parser;
// Add missing common commands
if (parent == null) {
parser.addFlag(flagVersion,
help: 'Print the command version', negatable: false);
parser.addFlag(flagVerbose,
abbr: 'v', help: 'Verbose mode', negatable: false);
}
parser.addFlag(flagHelp, abbr: 'h', help: 'Usage help', negatable: false);
}