mirror of https://github.com/spf13/cobra.git
fix: force ForEach-Object to return array in pwsh completion (#1850)
Fixes #1847
This commit is contained in:
parent
430549841b
commit
c6b9971923
|
@ -137,7 +137,7 @@ filter __%[1]s_escapeStringWithSpecialChars {
|
||||||
}
|
}
|
||||||
|
|
||||||
$Longest = 0
|
$Longest = 0
|
||||||
$Values = $Out | ForEach-Object {
|
[Array]$Values = $Out | ForEach-Object {
|
||||||
#Split the output in name and description
|
#Split the output in name and description
|
||||||
`+" $Name, $Description = $_.Split(\"`t\",2)"+`
|
`+" $Name, $Description = $_.Split(\"`t\",2)"+`
|
||||||
__%[1]s_debug "Name: $Name Description: $Description"
|
__%[1]s_debug "Name: $Name Description: $Description"
|
||||||
|
|
Loading…
Reference in New Issue