4 ms·
Powershell is a beacon of light in this regard. It doesn't get much love outside Windows sysadmins, and it's not perfect, but it's phenomenally good for discove
by psd1 3y ago
Powershell is a beacon of light in this regard. It doesn't get much love outside Windows sysadmins, and it's not perfect, but it's phenomenally good for discoverability.
Every command has regular naming (verb-noun or verb-qualifiednoun).
Modules are listable - you can easily find what commands are available. You can find and install modules by tag.
Switches and parameters are fairly regular.
Recent versions offer inline help, so you can look up a parameter without losing your buffer.
Commands are overloaded, so tab-completion is informed by the choices you've made already - in some instances, even by the values you've supplied to previous parameters.
When writing commands, you just decorate your parameters with attributes to create the same slick ux (argparse is windy and primitive by comparison).
There are things python does better, but I find powershell to be a far superior scripting language. It's on every Linux box I use.
Long-time bash users complain that it's too verbose, which I find silly since I tab-complete everything...? ...and, aliases...?
The big downside is the startup time, which can balloon quickly as you build your profile. That makes me run it as root, which I accept is sinful. MS is rightly cagey about implementing sudo, so that won't be fixed soon. You can run it with -no profile, and you can do deferred-processing magic, but it is still a barrier to adoption. I'd encourage anyone to push through that and give it a chance.