Skip to content

Commit

Permalink
Merge pull request #211993 from microsoft/tyriar/pwsh5
Browse files Browse the repository at this point in the history
Disable sending via CompletionCompleters for pwsh5
  • Loading branch information
Tyriar authored May 29, 2024
2 parents 0cb971b + fe470c8 commit d4b07e1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function Send-Completions {
# `[` is included here as namespace commands are not included in CompleteCommand(''),
# additionally for some reason CompleteVariable('[') causes the prompt to clear and reprint
# multiple times
if ($completionPrefix.Contains(' ') -or $completionPrefix.Contains('[')) {
if ($completionPrefix.Contains(' ') -or $completionPrefix.Contains('[') -or $PSVersionTable.PSVersion -lt "6.0") {
$completions = TabExpansion2 -inputScript $completionPrefix -cursorColumn $cursorIndex
if ($null -ne $completions.CompletionMatches) {
$result += ";$($completions.ReplacementIndex);$($completions.ReplacementLength);$($cursorIndex);"
Expand Down

0 comments on commit d4b07e1

Please sign in to comment.