Re:Why Does Windows Use Backslash as Path Separator?
by Nihilartikel on Wednesday April 24, 2024 @06:20PM
(#40150544)
I work a lot in powershell, and I want to like it. It is built around good ideas.. but oof, every time I have to special case on a return value being either a list or a single item depending on the result-len==1 or not, I die a little inside.
[ Parent
| on HN ]
Re:Why Does Windows Use Backslash as Path Separator?
by ScottEvtuch on Wednesday April 24, 2024 @06:39PM
(#40150719)
I think there are some tricks to ensure a list in pwsh for these sort of operations. I vaguely recall ending variable assignments with a comma to avoid this.
Re:Why Does Windows Use Backslash as Path Separator?
by jiggawatts on Wednesday April 24, 2024 @06:47PM
(#40150806)
$alwaysList = @( Get-Something )