Hacker News new | ask | show | jobs
by pthr 1220 days ago
oh-my-zsh on Linux is absolutely great, especially with autosuggestions and syntax-highlighting enabled.

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.

1 comments

> 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?

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!
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.

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.)