| 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_; |
nothing calls this directly
no test coverage detected