Hacker News new | ask | show | jobs
by lelandbatey 54 days ago
None of those have the #1 best thing bash is good at: bash is already installed, nushell and fish are not.

Powershell is, as I understand it, not available on Linux but is omnipresent on Windows, so hopefully the windows folks can use it like they would bash.

3 comments

No, powershell runs on Linux, it just sucks because it wants objects and everything on *nix speaks streams of text.
Arguably that is an improvement over streams of text that have to be re-parsed in every utility and sometimes incorrectly since quoting is problematic. OTOH, Powershell lacks a nice way of dealing with the objects pieces and streams the way e.g. LINQ does, or perhaps LISP can.
> Powershell is, as I understand it, not available on Linux but is omnipresent on Windows

Do note that Windows Powershell and Powershell are NOT the same. The following does work in Powershell, but not Windows Powershell.

    echo hello && echo hello
Specifically Windows Powershell does not support `&&` or `||` (the main difference I immediately notice) and probably a lot of other things are different.
PowerShell works on Windows because of WMI, to a first approximation.

Because Windows is tied together through APIs and databases and not text files (unlike Linux), everything is text is not as useful as something that can talk objects. And a lot of Windows is object oriented, from the window message dispatching system through COM and down to NT's object manager.