| 100 | static void PrintCmdHelpInfo(const std::string& msg) { PrintCmdHelpInfo(msg.c_str()); } |
| 101 | |
| 102 | static void PrintAllCmd() { |
| 103 | std::cout << "there is cmd list:" << std::endl; |
| 104 | int count = sizeof(builtin_cmd_list) / sizeof(char*); |
| 105 | bool newline = false; |
| 106 | for (int i = 0; i < count; i += 2) { |
| 107 | std::cout << std::setiosflags(std::ios::left) << std::setw(20) << builtin_cmd_list[i]; |
| 108 | if (newline) { |
| 109 | std::cout << std::endl; |
| 110 | newline = false; |
| 111 | } else { |
| 112 | newline = true; |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | std::cout << std::endl |
| 117 | << "help [cmd] for details." << std::endl; |
| 118 | } |
| 119 | |
| 120 | // return false if similar command(s) not found |
| 121 | static bool PromptSimilarCmd(const char* msg) { |
no outgoing calls
no test coverage detected