共用方式為


CommandCompletion.CompleteInput Method

Definition

Overloads

CompleteInput(String, Int32, Hashtable)
CompleteInput(Ast, Token[], IScriptPosition, Hashtable)
CompleteInput(String, Int32, Hashtable, PowerShell)

Invokes the script function TabExpansion2.

CompleteInput(Ast, Token[], IScriptPosition, Hashtable, PowerShell)

Invokes the script function TabExpansion2.

CompleteInput(String, Int32, Hashtable)

public:
 static System::Management::Automation::CommandCompletion ^ CompleteInput(System::String ^ input, int cursorIndex, System::Collections::Hashtable ^ options);
public static System.Management.Automation.CommandCompletion CompleteInput (string input, int cursorIndex, System.Collections.Hashtable options);
static member CompleteInput : string * int * System.Collections.Hashtable -> System.Management.Automation.CommandCompletion
Public Shared Function CompleteInput (input As String, cursorIndex As Integer, options As Hashtable) As CommandCompletion

Parameters

input
String

The input to complete.

cursorIndex
Int32

The index of the cursor in the input.

options
Hashtable

Optional options to configure how completion is performed.

Returns

Applies to

CompleteInput(Ast, Token[], IScriptPosition, Hashtable)

public:
 static System::Management::Automation::CommandCompletion ^ CompleteInput(System::Management::Automation::Language::Ast ^ ast, cli::array <System::Management::Automation::Language::Token ^> ^ tokens, System::Management::Automation::Language::IScriptPosition ^ positionOfCursor, System::Collections::Hashtable ^ options);
public static System.Management.Automation.CommandCompletion CompleteInput (System.Management.Automation.Language.Ast ast, System.Management.Automation.Language.Token[] tokens, System.Management.Automation.Language.IScriptPosition positionOfCursor, System.Collections.Hashtable options);
static member CompleteInput : System.Management.Automation.Language.Ast * System.Management.Automation.Language.Token[] * System.Management.Automation.Language.IScriptPosition * System.Collections.Hashtable -> System.Management.Automation.CommandCompletion
Public Shared Function CompleteInput (ast As Ast, tokens As Token(), positionOfCursor As IScriptPosition, options As Hashtable) As CommandCompletion

Parameters

ast
Ast

Ast for pre-parsed input.

tokens
Token[]

Tokens for pre-parsed input.

positionOfCursor
IScriptPosition
options
Hashtable

Optional options to configure how completion is performed.

Returns

Applies to

CompleteInput(String, Int32, Hashtable, PowerShell)

Invokes the script function TabExpansion2.

public:
 static System::Management::Automation::CommandCompletion ^ CompleteInput(System::String ^ input, int cursorIndex, System::Collections::Hashtable ^ options, System::Management::Automation::PowerShell ^ powershell);
public static System.Management.Automation.CommandCompletion CompleteInput (string input, int cursorIndex, System.Collections.Hashtable options, System.Management.Automation.PowerShell powershell);
static member CompleteInput : string * int * System.Collections.Hashtable * System.Management.Automation.PowerShell -> System.Management.Automation.CommandCompletion
Public Shared Function CompleteInput (input As String, cursorIndex As Integer, options As Hashtable, powershell As PowerShell) As CommandCompletion

Parameters

input
String

The input script to complete.

cursorIndex
Int32

The offset in input where completion is requested.

options
Hashtable

Optional parameter that specifies configurable options for completion.

powershell
PowerShell

The powershell to use to invoke the script function TabExpansion2.

Returns

A collection of completions with the replacement start and length.

Applies to

CompleteInput(Ast, Token[], IScriptPosition, Hashtable, PowerShell)

Invokes the script function TabExpansion2.

public:
 static System::Management::Automation::CommandCompletion ^ CompleteInput(System::Management::Automation::Language::Ast ^ ast, cli::array <System::Management::Automation::Language::Token ^> ^ tokens, System::Management::Automation::Language::IScriptPosition ^ cursorPosition, System::Collections::Hashtable ^ options, System::Management::Automation::PowerShell ^ powershell);
public static System.Management.Automation.CommandCompletion CompleteInput (System.Management.Automation.Language.Ast ast, System.Management.Automation.Language.Token[] tokens, System.Management.Automation.Language.IScriptPosition cursorPosition, System.Collections.Hashtable options, System.Management.Automation.PowerShell powershell);
static member CompleteInput : System.Management.Automation.Language.Ast * System.Management.Automation.Language.Token[] * System.Management.Automation.Language.IScriptPosition * System.Collections.Hashtable * System.Management.Automation.PowerShell -> System.Management.Automation.CommandCompletion
Public Shared Function CompleteInput (ast As Ast, tokens As Token(), cursorPosition As IScriptPosition, options As Hashtable, powershell As PowerShell) As CommandCompletion

Parameters

ast
Ast

The ast for pre-parsed input.

tokens
Token[]
cursorPosition
IScriptPosition
options
Hashtable

Optional options to configure how completion is performed.

powershell
PowerShell

The powershell to use to invoke the script function TabExpansion2.

Returns

Applies to