GetCompletionsForTokens(IReadOnlyList, Int32, String?) Method

Definition

Assembly XenoAtom.CommandLine.dll

Gets completion candidates for a tokenized command line and the index of the token being completed.

public IEnumerable<string> GetCompletionsForTokens(IReadOnlyList<string> tokens, int tokenIndex, string? commandName = null)

Parameters

tokens
IReadOnlyList<String>

A tokenized command line, typically including the executable name as the first token.

tokenIndex
Int32

The 0-based index of the token being completed. Use tokens.Count when completing a new token (cursor after whitespace).

commandName
String

The invocation name (e.g. "mytool") to strip from the beginning of the token stream.

Returns