* Generate the list of options for a specific command. This * job is done by the SingleCommand object itself, through the * SingleCommand::GetOpttionList() method. The result is written * straight to stdout. * * @param cmd std::string containing the command to query for * available options. */
| 187 | * available options. |
| 188 | */ |
| 189 | void Commands::ShellCompletion::list_options(const std::string &cmd) |
| 190 | { |
| 191 | for (auto const &c : commands->GetAllCommandObjects()) |
| 192 | { |
| 193 | if ((c->GetCommand() == cmd) || (c->GetAliasCommand() == cmd)) |
| 194 | { |
| 195 | std::cout << c->GetOptionsList() << std::endl; |
| 196 | return; |
| 197 | } |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | |
| 202 | void Commands::ShellCompletion::call_arg_helper(const std::string &cmd, |
nothing calls this directly
no test coverage detected