search method
Search for commands matching a prefix (for typeahead).
Implementation
List<CommandRegistration> search(String prefix) {
final p = prefix.toLowerCase();
return visible.where((r) {
if (r.name.toLowerCase().startsWith(p)) return true;
return r.allAliases.any((a) => a.toLowerCase().startsWith(p));
}).toList();
}