mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Update powershell_completions.go
Typo in previous. Change `$_` PSItem to `$__%[2]sCmd`
This commit is contained in:
parent
caeed9f2a4
commit
c901861b50
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
# Enumerate extant aliases for %[1]s (already set by user)
|
||||||
${__%[2]sAliases} = @()
|
${__%[2]sAliases} = @()
|
||||||
foreach($__%[2]sCmd in $available%[2]s){
|
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
|
# Register args completer for all cmds and aliases
|
||||||
[string[]]$joint%[2]snames = [array]$available%[2]s.Name + [array]${__%[2]sAliases}.Name + @('%[1]s')
|
[string[]]$joint%[2]snames = [array]$available%[2]s.Name + [array]${__%[2]sAliases}.Name + @('%[1]s')
|
||||||
|
|
Loading…
Reference in a new issue