From c6b99719235fcb18d950f972f27d95fdb0347f02 Mon Sep 17 00:00:00 2001 From: Norman Dankert Date: Fri, 25 Nov 2022 21:47:20 +0100 Subject: [PATCH] fix: force ForEach-Object to return array in pwsh completion (#1850) Fixes #1847 --- powershell_completions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powershell_completions.go b/powershell_completions.go index 004de42..c9d47e6 100644 --- a/powershell_completions.go +++ b/powershell_completions.go @@ -137,7 +137,7 @@ filter __%[1]s_escapeStringWithSpecialChars { } $Longest = 0 - $Values = $Out | ForEach-Object { + [Array]$Values = $Out | ForEach-Object { #Split the output in name and description `+" $Name, $Description = $_.Split(\"`t\",2)"+` __%[1]s_debug "Name: $Name Description: $Description"