top | item 34722780

(no title)

pthr | 3 years ago

What I feel Powershell does not give: short and simple command names, little syntax, and return values that are interpretable at a glance. And there's muscle memory of course, that's on me!

discuss

order

deafpolygon|3 years ago

Every command has a short name.

A handy "punctuations" cheatsheet I found on reddit: https://www.red-gate.com/simple-talk/wp-content/uploads/2015...

Short aliases for all major commands: https://devblogs.microsoft.com/scripting/table-of-basic-powe...

Some commands have more than one alias, and you can set your own, of course.

PowerShell also has a very nice help system. For any commands that Microsoft provides, you can type : Get-Help Get-ChildItem

It will list all the various parameters, as well as the various aliases.

As far as return values, you can do $? or type out $LastExitCode - it works the same way you expect.

For a fuller help view you can type "help Get-ChildItem" (all commands and parameters are NOT case-sensitive - it does not care if you type LS or ls, get-childitem vs GET-CHILDITEM does not matter). I prefer this - it helps in remembering.

lukeschlather|3 years ago

For me I genuinely think Powershell is fewer keystrokes than the equivalent terse bash. A lot of this is a question of heavily using history and editing old commands rather than writing new ones. And the old commands are legible so it's easy to tweak on the fly. Tab completion/history completion are really powerful. (You do need to enable PSReadline though, which is not out-of-the-box.)