| 27 | static CommandMap cmd_map; |
| 28 | |
| 29 | static iterator find_command(std::string_view name) { |
| 30 | if (auto it = cmd_map.find(name); it != cmd_map.end()) |
| 31 | return it; |
| 32 | throw CommandNotFound(agi::format(_("'%s' is not a valid command name"), name)); |
| 33 | } |
| 34 | |
| 35 | void reg(std::unique_ptr<Command> cmd) { |
| 36 | auto name = cmd->name(); |