rejectRest function
Throws a UsageException when argResults carries positional arguments a
command takes no meaning from.
The message must never start with Could not find a command named, which
runMerry treats as the signal to re-dispatch through run.
Implementation
void rejectRest(ArgResults argResults, String usage) {
final rest = argResults.rest;
if (rest.isNotEmpty) {
throw UsageException('Unexpected argument(s): ${rest.join(' ')}', usage);
}
}