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

Method call_arg_helper

src/common/cmdargparser.cpp:202–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200
201
202void Commands::ShellCompletion::call_arg_helper(const std::string &cmd,
203 const std::string &option)
204{
205 for (auto const &c : commands->GetAllCommandObjects())
206 {
207 if ((c->GetCommand() == cmd) || (c->GetAliasCommand() == cmd))
208 {
209 unsigned int skip = 0;
210 if ('-' == option[0])
211 {
212 skip++;
213 }
214 if ('-' == option[1])
215 {
216 skip++;
217 }
218 std::cout << c->CallArgumentHelper(option.substr(skip))
219 << std::endl;
220 return;
221 }
222 }
223}
224
225
226

Callers

nothing calls this directly

Calls 4

GetAllCommandObjectsMethod · 0.80
GetCommandMethod · 0.80
GetAliasCommandMethod · 0.80
CallArgumentHelperMethod · 0.80

Tested by

no test coverage detected