What about Nushell? It's still a separate install on all platforms, and not POSIX compliant (for reasons). But for me it's got all the benefits of powershell without the verboseness and imo a less obscure data structure.
This is about the only thing I like about PowerShell. In Unix-y shells I can use a combination of `jc` and `jq` to get a similar effect. Not quite as convenient as PowerShell though. That said, even after using it daily for years, I never was able to get used to all the weird inconsistencies and footguns.
I think that it is just the case of a Windows power user that is so used too it's ecosystem that he did not yet aquire the ease of use of linux native things.
PowerShell give the impression of being simple for basic users but it's a cluster shell of complexity. With a mess of everything being subtly different and broken. Just look at the case of Microsoft that hijacked the curl command in PowerShell with different arguments.
It's even worse if you are an intense user of vscode because they will obviously go hand to hand.
The whole article has proof of my opinion.
For example:
still have not bothered to add tab completion to my shell scripts because of the extra steps involved. I am lazy.
PowerShell gives you this for free when you write a “cmdlet”
He says that PowerShell gives the completion for free but for that he has to create a cmdlet and fill the prototype and typing info going with it.
And that will just give you basic argument completion but not logical one like a lot of tools do.
So it is not at all "free", just it is used to do it with PowerShell so doesn't notice the cost anymore. Like people saying that they never encounter bugs and annoying issues with Windows when they have some every few hours but they are totally used to it anymore.
I don't think it's fair to say Microsoft hijacked the curl command. It's just an alias for a powershell cmdlet. Powershell is definitely not perfect but theres less pitfalls than bash (string quoting, etc; there's loads: https://mywiki.wooledge.org/BashPitfalls). I think powershell was/is a step in the right direction, but in that respective I also think Nushell is a massive improvement on top too.
All of this is opinion though, I just prefer the stuff you get out the box you don't with bash.
Former Windows admin and ex-HEAVY Powershell user here!
I did too until I spent a few years using Bash and other programming languages. It's a super quirky language, and manipulating strings vs objects is a minor inconvenience, but I find Bash to be much more versatile in what it can do while being less verbose.
I also like that it depends on other utilities for core functionality, as I'm a big believer of "do one thing, and do it well".
Example: you can use Extract-Archive in Powershell (I think v7) to decompress ZIPs or tarballs (unsure if it works with gzipped archives), but what you can do with it is limited to the capabilities of .NET library and built-in shim from which that cmdlet originates. tar and zip/unzip, on the other hand, are classic coreutils that ONLY do this and, as a result, can handle many more edge cases, such as dealing with split archives.
Anyway, I usually turn to a programming language if I find myself needing objects, as it's better suited for the task, and PoSh gets super complicated once you start invoking DLLs (IMO, though this opinion is 10 years out of date from back when PoSh 5 was new and Snover was still involved)
Doubly anyway, PoSh is on Linux, as is .NET. It's usefulness there, however, is much more limited. For one, it isn't built-in like shells are. Additionally, because most *nix sysadmins will already know shell scripting, the motivation and need to learn it won't be as strong. In fact, the only time I've needed this was for some edge-case thing pertaining to Azure.
8 comments
[ 3.2 ms ] story [ 28.6 ms ] threadhttps://www.nushell.sh/
PowerShell give the impression of being simple for basic users but it's a cluster shell of complexity. With a mess of everything being subtly different and broken. Just look at the case of Microsoft that hijacked the curl command in PowerShell with different arguments.
It's even worse if you are an intense user of vscode because they will obviously go hand to hand.
The whole article has proof of my opinion.
For example: still have not bothered to add tab completion to my shell scripts because of the extra steps involved. I am lazy.
He says that PowerShell gives the completion for free but for that he has to create a cmdlet and fill the prototype and typing info going with it. And that will just give you basic argument completion but not logical one like a lot of tools do.So it is not at all "free", just it is used to do it with PowerShell so doesn't notice the cost anymore. Like people saying that they never encounter bugs and annoying issues with Windows when they have some every few hours but they are totally used to it anymore.
All of this is opinion though, I just prefer the stuff you get out the box you don't with bash.
I did too until I spent a few years using Bash and other programming languages. It's a super quirky language, and manipulating strings vs objects is a minor inconvenience, but I find Bash to be much more versatile in what it can do while being less verbose.
I also like that it depends on other utilities for core functionality, as I'm a big believer of "do one thing, and do it well".
Example: you can use Extract-Archive in Powershell (I think v7) to decompress ZIPs or tarballs (unsure if it works with gzipped archives), but what you can do with it is limited to the capabilities of .NET library and built-in shim from which that cmdlet originates. tar and zip/unzip, on the other hand, are classic coreutils that ONLY do this and, as a result, can handle many more edge cases, such as dealing with split archives.
Anyway, I usually turn to a programming language if I find myself needing objects, as it's better suited for the task, and PoSh gets super complicated once you start invoking DLLs (IMO, though this opinion is 10 years out of date from back when PoSh 5 was new and Snover was still involved)
Doubly anyway, PoSh is on Linux, as is .NET. It's usefulness there, however, is much more limited. For one, it isn't built-in like shells are. Additionally, because most *nix sysadmins will already know shell scripting, the motivation and need to learn it won't be as strong. In fact, the only time I've needed this was for some edge-case thing pertaining to Azure.