MCPcopy Create free account
hub / github.com/baidu/tera / PrintAllCmd

Function PrintAllCmd

src/lbcli_main.cc:102–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100static void PrintCmdHelpInfo(const std::string& msg) { PrintCmdHelpInfo(msg.c_str()); }
101
102static 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
121static bool PromptSimilarCmd(const char* msg) {

Callers 2

PrintUnknownCmdHelpInfoFunction · 0.70
HelpOpFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected