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
null
if not found.- helpFull
abstract Str? helpFull()
Full help text for this command, or
null
for 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
-
.- profile
Profile configuration.
- prompt
Conveniece for
Env.cur.prompt
.- promptChoice
Int promptChoice(Str msg, Range range)
Convenience for
prompt
with an integer range choice, returns the selected choise, or aborts if invalid input or out of range.- promptYesNo
Bool promptYesNo(Str msg, Str def := "y")
Convenience for
prompt
with yes/no choice, return true fory
or false forn
. If enter is pressed with no choice, then usedef
for default.- props
static Props props()
Props configuration.
- run
abstract Int run()
Run this command and return exit code.
- showHelp
Void showHelp()
Convenience to display help for this command.
- sig
virtual Str sig()
Help signature.
- workDir
File workDir()
Get the current working directory.