ResourceType.CompleteArgument Method

Definition

Implementations of this function are called by PowerShell to complete arguments.

public System.Collections.Generic.IEnumerable<System.Management.Automation.CompletionResult> CompleteArgument (string commandName, string parameterName, string wordToComplete, System.Management.Automation.Language.CommandAst commandAst, System.Collections.IDictionary fakeBoundParameters);
abstract member CompleteArgument : string * string * string * System.Management.Automation.Language.CommandAst * System.Collections.IDictionary -> seq<System.Management.Automation.CompletionResult>
override this.CompleteArgument : string * string * string * System.Management.Automation.Language.CommandAst * System.Collections.IDictionary -> seq<System.Management.Automation.CompletionResult>
Public Iterator Overridable NotOverridable Function CompleteArgument (commandName As String, parameterName As String, wordToComplete As String, commandAst As CommandAst, fakeBoundParameters As IDictionary) As IEnumerable(Of CompletionResult)

Parameters

commandName
String

The name of the command that needs argument completion.

parameterName
String

The name of the parameter that needs argument completion.

wordToComplete
String

The (possibly empty) word being completed.

commandAst
CommandAst

The command ast in case it is needed for completion.

fakeBoundParameters
IDictionary

This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot or will not attempt to evaluate an argument, in which case you may need to use commandAst.

Returns

IEnumerable<CompletionResult>

A collection of completion results, most like with ResultType set to ParameterValue.

Implements

Applies to