Hacker News new | ask | show | jobs
by vxNsr 1415 days ago
This is why imo powershell (when done right) is more powerful than bash (no matter how correctly it’s done). Powershell cmdlet names are descriptive and generally make sense as do the parameter names, additionally the guidelines for how to make powershell commands forces a certain style that once you grok it makes sense for most powershell commands.

If bash has something like that I’m still missing it.

Obviously the brevity of bash can be its own power.

3 comments

I do feel like we are all a little beholden to bash and it is tiring. While I will put simple work into simple bash scripts I always use shellcheck and do ‘set -euo pipefail’. For the life of me I can’t remember what that is or why I need it, I just know that I do. (I’d be comfortable looking it up if I actually cared enough to.)

Anything more than trivial I do in a high level programming language like Go (previously I would use Ruby or Perl).

From everything I’ve seen PS is a nice direction to go in.

I wish there was a sudden upheaval and everybody used a shell that wasn’t so legacy-cruft-laden.

PowerShell’s learning curve was too steep for me (or maybe I didn’t try hard enough, idk). I used it for a couple of years, but once WSL turned up I went back to my trusty old Linux skills.
The brevity is great when used interactively.

For scripting you can always use Python, which is lightyears ahead of PS.