Re:Windows gets a new terminal
by lenkite on Monday May 06, 2019 @05:01PM
(#19843838)
The concepts around Powershell are good. But the language is a nightmare and simple things like the short-circuit operator are completely broken.
[ Parent
| on HN ]
Re:Windows gets a new terminal
by majkinetor on Monday May 06, 2019 @05:10PM
(#19843920)
If you use aliases then its not nightmare. Use aliases, they are the same as on linux and even better (you can deduce them from the full name by standard).
> short-circuit operator are completely broken.
What do you mean ? This kind of thing ?:
> 0 -and (Write-Host 2)
False
> 1 -and (Write-Host 2)
2
False
Not typically used in PowerShell, its bash paradigm IMO. There are objects here, so we throw error objects mostly and combine lines differently.Unfortunately, outputting the boolean result makes "and" rather useless. See https://github.com/PowerShell/PowerShell/issues/3241