public static IList <CompletionResult> CompleteInput(string wordToComplete, CommandAst ast, int cursorPosition) { var completeCommandParameters = CompleteCommandParameters.Create(wordToComplete, ast, cursorPosition); if (completeCommandParameters.IsCompletingCommand) { return(CompleteGitCommands(wordToComplete: wordToComplete)); } return(CompleteGitCommand(completeCommandParameters)); }
public static CompleteCommandParameters CreateCompleteCommandParameters(this string str, int cursorPosition) { var(wordToComplete, ast) = GetData(str, cursorPosition); return(CompleteCommandParameters.Create(wordToComplete, ast, cursorPosition)); }