I hope I didn’t come across as defending ps.
PS sucks and whoever decided to have functions use capital case with dashes in between needs to have their brain scanned
I do a lot of work in PS and I don’t find it that bad. But you forgot what’s even dumber about their function naming conventions.
Function names are supposed to be a single word verb, then the dash, then the rest. But not any verb, you’re supposed to use one from PS’s list of acceptable ones which has some really weird omissions. And they break their own single word verb convention with “acceptable verbs” ConvertTo and ConvertFrom (ConvertTo-SecureString, ConvertFrom-Json), which are the only exception to one word verbs before the dash.
Function names are definitely one of my biggest peeves with it.
Additionally, their basic comparison operators are dumb as hell. How is “-le” better or clearer in meaning that “<=”? -ne instead of !=, but == isn’t just -e, it’s -eq. And you can’t slap an n in front of other comparators for not, -nle isn’t a thing. You gotta wrap the whole comparison in parentheses and slap an ! on the front or slap -not in front. But don’t try to do !-le, because that’s also not a thing. It’s not terrible but I refuse to believe that -eq is more readable than ==
Functionally speaking, PS is a really good shell language. Its minor things about it that I dont enjoy. As you said, it feels like the language design has some poor decisions.
I really want to love the “everything is an object” of power shell but I just have zero uses for using a shell on windows. Granted, my windows usage is like 15 minutes a week most of the time, but still. I also can’t be bothered to use it for work because it’s exclusively Linux/linux-ish over there so it’s not worth bothering.
Either way, I like the idea, can’t really justify figuring out the details.
It’s a wonderful tool for me in a Windows environment/shop, especially with how it works well with all the Windows and Microsoft administration systems/tools we use.
Personally, I’m less interested in any language’s hypothetical merits than how it fits as a tool for what I need to accomplish and ease of future maintenance when the script/program/automation inevitably needs to be adjusted.
All that said, I can’t think of a legitimate reason to use PSCore on non-Windows hardware unless you’re just really familiar with PS and literally nothing else. Even then you’re better off taking time learning a better tool for that environment.
I like that you actually can ls in power shell now
Yes, yes you can.
Also, WSL and windows terminal go a very long way in making windows actually usable…
Yeah but tbh i really despise powershells syntax. But i’m happy it is pretty powerful.
Unfortunately, bash syntax isnt amazing either
But Powershell is worse
Yeah. I’ve said this before and got grilled for it but I wish there was a shell scripting language that doesn’t have arcane syntax.
Fish? I like fish.
Can anyone name any living language, scripting or otherwise, without arcane syntax?
Bash came out decades ago and powershell is brand new. It doesn’t really have an excuse to suck.
I hope I didn’t come across as defending ps. PS sucks and whoever decided to have functions use capital case with dashes in between needs to have their brain scanned
I do a lot of work in PS and I don’t find it that bad. But you forgot what’s even dumber about their function naming conventions.
Function names are supposed to be a single word verb, then the dash, then the rest. But not any verb, you’re supposed to use one from PS’s list of acceptable ones which has some really weird omissions. And they break their own single word verb convention with “acceptable verbs” ConvertTo and ConvertFrom (ConvertTo-SecureString, ConvertFrom-Json), which are the only exception to one word verbs before the dash.
Function names are definitely one of my biggest peeves with it.
Additionally, their basic comparison operators are dumb as hell. How is “-le” better or clearer in meaning that “<=”? -ne instead of !=, but == isn’t just -e, it’s -eq. And you can’t slap an n in front of other comparators for not, -nle isn’t a thing. You gotta wrap the whole comparison in parentheses and slap an ! on the front or slap -not in front. But don’t try to do !-le, because that’s also not a thing. It’s not terrible but I refuse to believe that -eq is more readable than ==
Functionally speaking, PS is a really good shell language. Its minor things about it that I dont enjoy. As you said, it feels like the language design has some poor decisions.
i’m often amazed at microsoft’s ability to take a useful product and make it agonizing to use
As long as you don’t have
ls
aliased tols -la
in your brain…If you can suppress 30 years of " -al" from following his buddy.
That’s actually “-la”, pal.
Updating pacman is always
pacman -yuS
PowerShell 7 is pretty sweet ngl
I really want to love the “everything is an object” of power shell but I just have zero uses for using a shell on windows. Granted, my windows usage is like 15 minutes a week most of the time, but still. I also can’t be bothered to use it for work because it’s exclusively Linux/linux-ish over there so it’s not worth bothering.
Either way, I like the idea, can’t really justify figuring out the details.
“But PS is open source ! Don’t you want to use it in Linux and MacOS?” - Microsoft probably
It’s a wonderful tool for me in a Windows environment/shop, especially with how it works well with all the Windows and Microsoft administration systems/tools we use.
Personally, I’m less interested in any language’s hypothetical merits than how it fits as a tool for what I need to accomplish and ease of future maintenance when the script/program/automation inevitably needs to be adjusted.
All that said, I can’t think of a legitimate reason to use PSCore on non-Windows hardware unless you’re just really familiar with PS and literally nothing else. Even then you’re better off taking time learning a better tool for that environment.
That’s a very good point. My angle is as a dev and not as IT or sys admin. Power shell is probably far more powerful in those circles.