Skip to content

Commit

Permalink
Update powershell_completions.go
Browse files Browse the repository at this point in the history
Typo in previous. Change `$_` PSItem to `$__%[2]sCmd`
  • Loading branch information
mavaddat committed Oct 29, 2023
1 parent caeed9f commit c901861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion powershell_completions.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ $available%[2]s = Get-Command -Name '%[1]s' -All -ErrorAction SilentlyContinue |
# Enumerate extant aliases for %[1]s (already set by user)
${__%[2]sAliases} = @()
foreach($__%[2]sCmd in $available%[2]s){
$__%[2]sAliases += Get-Alias | Where-Object { $_ -eq ($__%[2]sCmd | Resolve-Path) -or $_ -eq (Get-Command -Name $_ -ErrorAction SilentlyContinue).Definition}
$__%[2]sAliases += Get-Alias | Where-Object { $_ -eq ($__%[2]sCmd | Resolve-Path) -or $_ -eq (Get-Command -Name $__%[2]sCmd -ErrorAction SilentlyContinue).Definition}
}
# Register args completer for all cmds and aliases
[string[]]$joint%[2]snames = [array]$available%[2]s.Name + [array]${__%[2]sAliases}.Name + @('%[1]s')
Expand Down

0 comments on commit c901861

Please sign in to comment.