abstract const classstudsTools::Cmd
sys::Obj studsTools::Cmd
Cmd models a build tool command.
- abort
Print the given error message, show command help, then exit with error code.
- args
Str[] args()List command arguments. Arguments are any terms that trail the command name not prefixied with
-.- err
Convenience for
Env.cur.err.printLine.- get
Get the given command, or
nullif not found.- helpFull
abstract Str? helpFull()Full help text for this command, or
nullfor none.- helpShort
abstract Str helpShort()One-line short help text for this command.
- info
Convenience for
Env.cur.out.printLine.- list
static Cmd[] list()List all commands.
- name
abstract Str name()Unique name of this command.
- opts
Str[] opts()List of command options. Options are any terms that trail the command name and are prexifed with
-.- prompt
Conveniece for
Env.cur.prompt.- promptYesNo
Bool promptYesNo(Str msg, Str def := "y")Convenience for
promptwith yes/no choice, return true foryor false forn. If enter is pressed with no choice, then usedeffor default.- run
abstract Int run()Run this command and return exit code.
- showHelp
Void showHelp()Convenience to display help for this command to out.
- sig
virtual Str sig()Help signature.