| 239 | } |
| 240 | |
| 241 | Command::Result ConsoleInterface::helpCommand(const Command::ArgumentList_t& args, ConsoleInterface& console, AbstractModeManager&) |
| 242 | { |
| 243 | if(args.size() > 1) |
| 244 | { |
| 245 | auto result = console.getCommandDescription(args[1]); |
| 246 | if(result) |
| 247 | { |
| 248 | console.print("Help for command \"" + args[1] + "\":\n"); |
| 249 | console.print(*result + "\n"); |
| 250 | } |
| 251 | else |
| 252 | { |
| 253 | console.print("Help for command \"" + args[1] + "\" not found!\n"); |
| 254 | } |
| 255 | } |
| 256 | else |
| 257 | { |
| 258 | console.print("Commands:\n"); |
| 259 | for(auto& it : console.mCommandMap) |
| 260 | { |
| 261 | console.print(it.first); |
| 262 | } |
| 263 | console.print("\n"); |
| 264 | } |
| 265 | return Command::Result::SUCCESS; |
| 266 | } |
nothing calls this directly
no test coverage detected