invocation property

  1. @override
String get invocation
inherited

A single-line template for how to invoke this command (e.g. "pub get package").

Implementation

@override
String get invocation {
  final parents = [name];
  for (var command = parent; command != null; command = command.parent) {
    parents.add(command.name);
  }
  parents.add(runner!.executableName);

  final invocation = parents.reversed.join(' ');
  return subcommands.isNotEmpty ? invocationSubcommandLabel(invocation) : invocationCommandLabel(invocation);
}