Skip to content

Commit 063cbfe

Browse files
authored
Fixing confusing variable names in powershell suggest shim (#1222)
* Fixing confusing variable names in powershell suggest shim * Updating script version to 1.0.1
1 parent a536300 commit 063cbfe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# dotnet suggest shell start
22
$availableToComplete = (dotnet-suggest list) | Out-String
3-
$availableToCompleteArray = $availableToComplete.Split([Environment]::NewLine, [System.StringSplitOptions]::RemoveEmptyEntries)
3+
$availableToCompleteArray = $availableToComplete.Split([Environment]::NewLine, [System.StringSplitOptions]::RemoveEmptyEntries)
44

55

66
Register-ArgumentCompleter -Native -CommandName $availableToCompleteArray -ScriptBlock {
7-
param($commandName, $wordToComplete, $cursorPosition)
8-
$fullpath = (Get-Command $wordToComplete.CommandElements[0]).Source
7+
param($wordToComplete, $commandAst, $cursorPosition)
8+
$fullpath = (Get-Command $commandAst.CommandElements[0]).Source
99

10-
$arguments = $wordToComplete.Extent.ToString().Replace('"', '\"')
10+
$arguments = $commandAst.Extent.ToString().Replace('"', '\"')
1111
dotnet-suggest get -e $fullpath --position $cursorPosition -- "$arguments" | ForEach-Object {
1212
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
1313
}
1414
}
15-
$env:DOTNET_SUGGEST_SCRIPT_VERSION = "1.0.0"
15+
$env:DOTNET_SUGGEST_SCRIPT_VERSION = "1.0.1"
1616
# dotnet suggest script end

0 commit comments

Comments
 (0)