From b0fd67ece70bdcc2e6a34c1412ddc1e8739d8cd2 Mon Sep 17 00:00:00 2001 From: rsteube Date: Fri, 8 Nov 2024 22:51:56 +0100 Subject: [PATCH] powershell: register with list --- internal/shell/powershell/snippet.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/shell/powershell/snippet.go b/internal/shell/powershell/snippet.go index 37171dbe..5c62cac4 100644 --- a/internal/shell/powershell/snippet.go +++ b/internal/shell/powershell/snippet.go @@ -54,13 +54,12 @@ Function _%v_completer { $completions } -Register-ArgumentCompleter -Native -CommandName '%v' -ScriptBlock (Get-Item "Function:_%v_completer").ScriptBlock -%vRegister-ArgumentCompleter -Native -CommandName '%v.exe' -ScriptBlock (Get-Item "Function:_%v_completer").ScriptBlock +Register-ArgumentCompleter -Native -ScriptBlock (Get-Item "Function:_%v_completer").ScriptBlock -CommandName '%v'%v,'%v.exe' ` // Snippet creates the powershell completion script. func Snippet(cmd *cobra.Command) string { - prefix := "# " + prefix := " # " if runtime.GOOS == "windows" { prefix = "" } @@ -71,6 +70,5 @@ func Snippet(cmd *cobra.Command) string { cmd.Name(), cmd.Name(), prefix, - cmd.Name(), cmd.Name()) }