Пример #1
0
        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));
        }
Пример #2
0
 public static CompleteCommandParameters CreateCompleteCommandParameters(this string str, int cursorPosition)
 {
     var(wordToComplete, ast) = GetData(str, cursorPosition);
     return(CompleteCommandParameters.Create(wordToComplete, ast, cursorPosition));
 }