executeSubCommand method

Future<void> executeSubCommand(
  1. String cmd,
  2. AFSourceTemplateInsertions? insertions
)

Used to execute a subcommand.

cmd is the string text of the command, just as you would type it on the command line.

Implementation

Future<void> executeSubCommand(String cmd, AFSourceTemplateInsertions? insertions) async {
  final arguments = AFArgs.createFromString(cmd);
  final revisedCommand = this.reviseWithArguments(
    insertions: insertions ?? coreInsertions,
    arguments: arguments
  );

  revisedCommand.startCommand();
  await definitions.execute(revisedCommand);
}