printUsage method
void
printUsage()
Prints usage help text for this config
Implementation
void printUsage() {
print('');
print(
[
colorize('Usage:', [TerminalColor.bold]),
colorize('scr', [TerminalColor.yellow]),
colorize('<script_name>', [TerminalColor.brightWhite]),
colorize('[...args]', [TerminalColor.gray]),
].join(' '),
);
print(
[
' ' * 'Usage:'.length,
colorize('scr', [TerminalColor.yellow]),
colorize('-h', [TerminalColor.brightWhite]),
].join(' '),
);
print('');
final titleStyle = [TerminalColor.bold, TerminalColor.brightWhite];
printColor('Built-in flags:', titleStyle);
print('');
printBuiltins();
print('');
print(
[
colorize('Available scripts', [
TerminalColor.bold,
TerminalColor.brightWhite,
]),
(configSource?.isNotEmpty == true
? [
colorize(' on ', titleStyle),
colorize(
configSource!, [...titleStyle, TerminalColor.underline]),
colorize(':', titleStyle)
].join('')
: ':'),
].join(''),
);
print('');
printScripts();
}