getFullCommandName function

String getFullCommandName (
  1. CommandEntity entity
)

Full qualified command name with its parents names

Implementation

String getFullCommandName(CommandEntity entity) {
  var commandName = entity.name;

  for(var e = entity.parent; e != null; e = e.parent) {
    commandName = "${e.name} $commandName";
  }

  return commandName.trim();
}