expandAliases function
Rewrites the g alias to generate in-place.
Returns the (possibly mutated) argument list so the caller can pass it to
the CommandRunner. Only the first positional argument is considered, so
rekeens g auth login becomes rekeens generate auth login while
rekeens --version is left untouched.
Implementation
List<String> expandAliases(List<String> args) {
if (args.isNotEmpty && args.first == 'g') {
return ['generate', ...args.skip(1)];
}
return args;
}