MCPcopy Create free account
hub / github.com/daniele77/cli / GetCompletionRecursive

Method GetCompletionRecursive

include/cli/cli.h:570–578  ·  view source on GitHub ↗

* Retrieves completion suggestions for the user input recursively. * * This function checks if the user input starts with the current command's name. If it * does, it extracts the remaining part of the input and retrieves suggestions: * - From subcommands using their `GetCompletionRecursive` function. * - From the parent command (if available) using

Source from the content-addressed store, hash-verified

568 * @return A vector containing suggested completions for the user input.
569 */
570 std::vector<std::string> GetCompletionRecursive(const std::string& line) const override
571 {
572 if (line.rfind(Name(), 0) == 0) // line starts_with Name()
573 {
574 return GetCompletionRecursiveHelper(line, Name());
575 }
576
577 return Command::GetCompletionRecursive(line);
578 }
579
580 private:
581

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.45
GetCompletionsFunction · 0.45

Calls

no outgoing calls

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.36