MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / list_options

Method list_options

src/common/cmdargparser.cpp:189–199  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

187 * available options.
188 */
189void 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
202void Commands::ShellCompletion::call_arg_helper(const std::string &cmd,

Callers

nothing calls this directly

Calls 4

GetAllCommandObjectsMethod · 0.80
GetCommandMethod · 0.80
GetAliasCommandMethod · 0.80
GetOptionsListMethod · 0.80

Tested by

no test coverage detected