Returns the collection of completions relatives to this command. For simple commands, provides a base implementation that use the name of the command for aggregate commands (i.e., Menu), the function is redefined to give the menu command and the subcommand recursively
| 267 | // for aggregate commands (i.e., Menu), the function is redefined to give the menu command |
| 268 | // and the subcommand recursively |
| 269 | virtual std::vector<std::string> GetCompletionRecursive(const std::string& line) const |
| 270 | { |
| 271 | if (!enabled) return {}; |
| 272 | if (name.rfind(line, 0) == 0) return {name}; // name starts_with line |
| 273 | return {}; |
| 274 | } |
| 275 | protected: |
| 276 | const std::string& Name() const { return name; } |
| 277 | bool IsEnabled() const { return enabled; } |
nothing calls this directly
no outgoing calls
no test coverage detected