Skip to content

Commit b57237f

Browse files
authored
Fix wrong parameter order and name
You can't ignore parameter names, they're positional. This could be very misleading because it's using the wrong names
1 parent 82f8f14 commit b57237f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

reference/7.5/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,14 @@ example adds tab-completion for the `dotnet` Command Line Interface (CLI).
150150
```powershell
151151
$scriptblock = {
152152
param(
153+
$commandName,
154+
$parameterName,
153155
$wordToComplete,
154156
$commandAst,
155-
$cursorPosition
157+
$fakeBoundParameters
156158
)
157159
158-
dotnet complete --position $cursorPosition $commandAst.ToString() | ForEach-Object {
160+
dotnet complete --position $wordToComplete $parameterName.ToString() | ForEach-Object {
159161
[System.Management.Automation.CompletionResult]::new(
160162
$_, # completionText
161163
$_, # listItemText

0 commit comments

Comments
 (0)