Can you expand on why it is good I have never read any good evangelisation for it. I can not stand PowerShell the syntax is backward, least important information first. It is also very slow for me but I have understood that it is a pebkac issue. So I am open to be corrected.
By "got this right", the parent poster probably meant tab completion. You get that for free when writing a script or function, as well as basic syntax documentation. Both can be improved gradually by adding hints / comments in your script.
If you are bothered by the verbose `Verb-Noun` structure of commands, those are mostly used in scripts (and you never type them fully, you use tab-completion of course). On the commandline you use aliases for many of them.
For example listing files and directories created in the last 10 days:
ls | ? CreationTime -ge (Get-Date).AddDays(-10) | ft name, size
All the long words are tab completed (CreationTime, Get-Date, AddDays).
The fully verbose syntax you might write in a script looks a bit uglier:
I think they’re talking about powershells programming syntax which is much more sane than any Unix shell. There’s way less footguns and everything is typed. You’re not dealing with raw strings for everything.
If you don’t like the Verb-Noun nonsense I’d encourage you to look at the default aliases as they make everything a lot less verbose. For example Where-Object is just “where” or getchild-item is default aliased to ls and gci.
Id encourage you to look at NuShell as well since it is mostly the same philosophy as PowerShell.
Bad for your reasons (slow etc), good for siblings (objects).
Also, understandable flags that auto-shorten. Eg:
Descriptive-Command-Name -DescriptiveOption 32
Can be typed as:
d-c-n <tab> -des 32
---
Interactively it's still far behind zsh sadly due to startup time but when I'm doing something thoughtful I prefer it. If you're not entering directories and doing small stuff, use pwsh. And for all shell scripting
You mean Unix shell syntax. Powershell has got this absolutely right ,and only this (which is probably still a 50% of what a shell is)
Can you expand on why it is good I have never read any good evangelisation for it. I can not stand PowerShell the syntax is backward, least important information first. It is also very slow for me but I have understood that it is a pebkac issue. So I am open to be corrected.
By "got this right", the parent poster probably meant tab completion. You get that for free when writing a script or function, as well as basic syntax documentation. Both can be improved gradually by adding hints / comments in your script.
If you are bothered by the verbose `Verb-Noun` structure of commands, those are mostly used in scripts (and you never type them fully, you use tab-completion of course). On the commandline you use aliases for many of them.
For example listing files and directories created in the last 10 days:
All the long words are tab completed (CreationTime, Get-Date, AddDays). The fully verbose syntax you might write in a script looks a bit uglier: Also PowerShell is NOT case-sensitive, even though many people seem to think so.I think they’re talking about powershells programming syntax which is much more sane than any Unix shell. There’s way less footguns and everything is typed. You’re not dealing with raw strings for everything.
If you don’t like the Verb-Noun nonsense I’d encourage you to look at the default aliases as they make everything a lot less verbose. For example Where-Object is just “where” or getchild-item is default aliased to ls and gci.
Id encourage you to look at NuShell as well since it is mostly the same philosophy as PowerShell.
On phone:
Bad for your reasons (slow etc), good for siblings (objects).
Also, understandable flags that auto-shorten. Eg:
Descriptive-Command-Name -DescriptiveOption 32
Can be typed as:
d-c-n <tab> -des 32
---
Interactively it's still far behind zsh sadly due to startup time but when I'm doing something thoughtful I prefer it. If you're not entering directories and doing small stuff, use pwsh. And for all shell scripting
Perl solved that 20 years ago.
And `rc` under plan9/9front did a Unix shell better than the classic Unix itself.