* 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
| 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 |
no outgoing calls