dropshell release 2025.0524.2033
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 11s
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 11s
This commit is contained in:
@ -20,6 +20,15 @@ void CommandRegistry::register_command(const CommandInfo& info) {
|
||||
const CommandInfo* CommandRegistry::find_command(const std::string& name) const {
|
||||
auto it = command_map_.find(name);
|
||||
if (it != command_map_.end()) return it->second.get();
|
||||
|
||||
// go deep now.
|
||||
for (const auto& cmd : all_commands_) {
|
||||
if (cmd->names.size() > 0) {
|
||||
for (const auto& altname : cmd->names) {
|
||||
if (name == altname) return cmd.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user