Skip to content

Commit

Permalink
Update powershell_completions.go
Browse files Browse the repository at this point in the history
Preliminary assignment before use
  • Loading branch information
mavaddat authored Jun 19, 2023
1 parent d17f539 commit f43b653
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion powershell_completions.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ foreach($__%[2]sCmd in $available%[2]s){
$__%[2]sAliases += Get-Alias | Where-Object { $_.Definition -eq ($__%[2]sCmd | Resolve-Path) }
}
# Register args completer for all cmds and aliases
Register-ArgumentCompleter -CommandName ([array]$available%[2]s.Name + [array]${__%[2]sAliases}.Name + @('%[1]s')) -ScriptBlock ${__%[2]sCompleterBlock}
[string[]]$joint%[2]snames = [array]$available%[2]s.Name + [array]${__%[2]sAliases}.Name + @('%[1]s')
Register-ArgumentCompleter -CommandName $joint%[2]snames -ScriptBlock ${__%[2]sCompleterBlock}
`, name, nameForVar, compCmd,
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, activeHelpEnvVar(name)))
Expand Down

0 comments on commit f43b653

Please sign in to comment.