by pthr · 3y ago · 0 comments
On Windows I've settled with Windows Terminal and clink.
I've tried Powershell too but never got used to it. The concept where everything is an object sounds great. But in practice, to me it only is when scripting. When doing interactive work on the command line (which is what I do all day), as a human, nothing beats plain text for me. Enlighten me if this I missed the point of Powershell.
Plain-text has gotten annoying to me now (having to shell out to grep, cut, and awk is very meh).
What's your pain point when trying to use powershell?
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.