MCPcopy Create free account
hub / github.com/catboost/catboost / DoRun

Method DoRun

library/cpp/getopt/small/completer_command.cpp:139–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137 }
138
139 int DoRun(NLastGetopt::TOptsParseResult&& parsedOptions) override {
140 auto arg = parsedOptions.GetFreeArgs()[0];
141 arg.to_lower();
142
143 if (arg == "bash") {
144 TBashCompletionGenerator(Modes_).Generate(Command_, Cout);
145 } else if (arg == "zsh") {
146 TZshCompletionGenerator(Modes_).Generate(Command_, Cout);
147 } else {
148 Cerr << "Unknown shell name " << arg.Quote() << Endl;
149 parsedOptions.PrintUsage();
150 return 1;
151 }
152
153 return 0;
154 }
155
156 private:
157 TString Command_;

Callers

nothing calls this directly

Calls 6

GetFreeArgsMethod · 0.45
to_lowerMethod · 0.45
GenerateMethod · 0.45
PrintUsageMethod · 0.45

Tested by

no test coverage detected