Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> In a redesigned shell, ideally there would be a richer way to describe the result of a program

And there is in PowerShell - you can return arbitrary complex object.



Do people use PowerShell for interactive use a lot?

As a Unix person my impression of PowerShell is that it’s more robust for scripting than the Unix shells, but that the Unix shells are more suitable for interactive use. And for anything of sufficient complexity and/or size I’d personally reach for either Python or I’d write a program in Rust.

I guess in the end it comes down to personal preference and what you are familiar with.

Incidentally, when I started at the university, when I was still using Windows, and PowerShell had recently come out I actually started with PowerShell and was getting comfortable with it. But we learned about Linux at the university and a friend I made at the university was showing me Linux stuff, and I started using Linux and FreeBSD instead of Windows. If it wasn’t for that then I’d probably have been a PowerShell person today.


PowerShell is underrated, but it's its own worst enemy, stubbornly insisting on LongForm-VerbNoun syntax for all but the most common commands that anyone familiar with the shell would expect. A few UI touchups and it could go substantially further, especially as MS continues quietly gutting the NT heritage out of Win10 and integrating more and more nix-like features, including full Linux kernel emulation, all so you can run Docker without a VM! What a world.

I continue to believe that within 10 years, Microsoft will have just switched entirely to Linux+WINE under the covers. :)


The long command names are really only something you use in scripts. Powershell is my main shell for both scripting and interaction and at least on my system it comes installed with tons of short aliases for common commands.

For example: Get-ChildItem was already aliased to both ls and gci on my system.


Not just on your system. Default aliases come OTB and they were only slightly changed with arise of the pwsh so not to mirror some native commands.


I use powershell full time and quite honestly I think it's better than bash. The main selling point for me was that I only need to learn posh and how it works vs having to learn 20 different utilities with varying UX.

The best example of this I think is ConvertFrom-Json vs something like jq. Jq's syntax is extremely difficult to learn, but with powershell I just built upon the knowledge I already had and got to use the same commands I use everywhere else.


I use powershell interactively 24/7.

Its totally funny (and lame) that people complain about its verbosity since its not true (verbosity is optional) and that typically shows that person wasn't involved at learning it at all and thus can be ignored.

Furthermore, there is an alias naming standard in posh, besides having all linux like names, they are usually named by first letter of verb and first and second word letter of noun (Get-ChildItem => gci; Get-Service => gsv; )

Then we have a parameter aliases, just use any unique subset of the its name ( -Computer => -C or -Co or -Com ... )

You can also customize those names with proxy cmdlets.

All in all, almost 100% of the time PowerShell sentence is way shorter then equivalent bash sentence.


I used PowerShell basically only in an interactive capacity for a few years, but have switched to nu full-time a few months back.

There's enough aliases for bashisms that honestly, the largest hurdle to switching was "rm -r -Fo" rather than "rm -rf".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: