5 ms·
> Powershell is nearly always a better choice Not if I want resemblance with Bash-like shells. I guess that's also the point of this: Most people already know
by jhasse 9y ago
> Powershell is nearly always a better choice
Not if I want resemblance with Bash-like shells. I guess that's also the point of this: Most people already know sudo from Linux and cmd.exe, now they can use both together.
- nailer 9y ago20 year bash user and recent Powershell convert here. Powershell has proper things like profiles and aliases, cool stuff like being able to cd and rm the Environment and Registry keys like files. cmd has none of those. (Plus powershells structured output so you can use 'where' and 'select' and 'get-member' rather than scraping with regexs. )
- posguy 9y agoBut why saddle myself with a registry? I just don't see the need. Also, basic stuff like tab completion and so forth just doesn't exist in Powershell, copying/pasting is a nightmare, and it has its own syntax tomfoolrey like opening Internet Exploder when I just wanna download a damn file via CLI! It isn't that hard to build a decent shell, if zsh can do it, why can't MS put a few decent interns on it and get their act together? I feel like I'm knocking skulls together whenever I end up talking Powershell with someone from across the lake here in Seattle, this stuff isn't all that difficult!
- holydude 9y agoBecause you are just used to the way how bash/zsh works and Powershell is superior to any of the shells mentioned. I am a "recent" powershell convert (started 1y ago) and this different paradigm feels now more natural than traditional text parsing.
- posguy 9y agoWow, way to completely ignore the question. Saying "its better" without even responding to the glaring unresolved errors by MS I highlighted is totally pointless. Your comment successfully added nothing of value to this HN thread, besides showing your lack of ability to string together a coherent and logical reply, good jerb!
- holydude 9y agoQuiet the contrary to be honest. Calling MS tech names and dismissing the great work of those that created PS is just a sign of immaturity or simply an OSS zealotry. Your bashing of PS either comes from ignorance or you simply did not invest enough time to learn the technology. Tab completion and copy/pasting works flawlessly in powershell..you can even pipe to clip and have it in your clipboard. Downloading a damn file from internet is one of the simplest things you can do in PowerShell (and imho more pleasant than gluing wget/curl in your scripts). Bashing the syntax is totally unfair as it's a different paradigm.
- posguy 9y agoI tried approximately a year ago to figure out Powershell, other people in this thread have said "Oh, install all these things to clean it up, here are only a handful of them, have fun" which is pretty useless. I don't want to have to spend my time installing a bunch of crap on each Windows box I touch, it either has sane defaults and is usable from the get go, or I'm polishing a turd.
- nailer 9y agoAs the powershell advocate I get where you're coming from. Half the stuff in PSCX should be there by default, as should a damned tabbed terminal (ComEmu and Hyper both have serious issues right now). At least Microsoft is working on the latter.
- holydude 9y agoI totally agree that's why I never install anything beyond what's there by default. I do not even try to enable stuff that is normally disabled. With that I learned to live with somewhat crappy terminal. Other than that I do not see anything that I would need.
- stinos 9y agoI share your enthusiasm about PS, and yes I personally like e.g. it's object piping way more than plain text piping and sometimes error-prone parsing in *nix, but calling it 'superior' is maybe a bridge too far. Above all, it's just different.
- nailer 9y agoIt's like comparing Word to TeX. Word presentation is usually content. In TeX they're separate. From that point of view you could reasonably argue that powershell is superior.
- stinos 9y agoAlso, basic stuff like tab completion and so forth just doesn't exist in Powershell, copying/pasting is a nightmare Sorry but this just sounds like you don't know PS well enough. Run it under ConEmu, install PSReadline, PsFzf and a bunch of other goodies and those problems are gone. I'm not saying it's obvious, but there's enough tutorials out there for getting you up and running. opening Internet Exploder when I just wanna download a damn file via CLI! Again, seems like you are doing it wrong: > wget news.ycombinator.com StatusCode : 200 StatusDescription : OK Content : <html op="news"><head><meta name="referrer" ...
- posguy 9y agoIs your GNU wget busted? Should look like this: >wget news.ycombinator.com --2017-06-15 03:04:37-- http://news.ycombinator.com/ http://news.ycombinator.com/ Resolving news.ycombinator.com (news.ycombinator.com)... 104.20.44.44, 104.20.43.44 I'm not gonna install a million plugins to fix Powershell, what incentive do I have? At this point Windows is a rapidly dying platform in Point of Sale, with SLES having fully replaced it in nearly every major US grocer. Nearly every interaction I have had with Powershell in the past 3 years has left me sad, angry, and frustrated. Building a decent shell isn't a monumental task, and I don't get why the occasional Windows box I touch is always a mess wrt Powershell.
- stinos 9y agoIt's not GNU wget, wget is aliased to PowerShell's Invoke-WebRequest. I should have shown that command probably. You don't have to install plugins, tab completion etc works out of the box, copy/paste as well but in a not too handy way, I was just suggesting how to make it better. Then again, I have yet to meet a shell and OS which has all tools I want out of the box so for me the 'I down't want to install stuff' point is moot. Though if it's not for you, that's fine but you might get stuck at times. Nearly every interaction I have had with Powershell in the past 3 years has left me sad, angry, and frustrated. That is certainly possible, but isn't that just the result of not knowing it well enough? I mean, I've felt the same when first learning bash years ago. I quickly figured it mostly wasn't because of bash, but rather my lack of knowledge and/or trying to do things my (conceived 'proper') way instead of the bash way.
- kelnos 9y ago> cool stuff like being able to cd and rm the Environment and Registry keys like files. cmd has none of those Emblematic of what's wrong with the Powershell (or perhaps MS as a whole) philosophy: you don't build this functionality into a shell, you build a file system module (you'd do it with FUSE if on Linux) that "mounts" the registry as a bunch of files. Then you could edit it in any shell or text editor, or even in a GUI file manager and GUI text editor if you wanted to.
- duke360 9y agoi would call it "what's right with powershell" instead
- cptn_brittish 9y agoBy adding extra complexity to a shell command instead of offloading the process to small programs with a defined api? I can see a lot more maintainability and portability of a implementation using FUSE to mount these systems as filesystems (so the abstraction is complete across the entire system instead of just in the command). Also the ease of having a abstraction which does not require special capabilities to be added to a program before it is useful is a reason that no system has properly supported these models before in this manner. On a UNIX system the same techniques could of been implemented sometime between the 70's and now to interact with environment variables and it has probably been implemented before but it has not gained mindshare as that approach is not scalable.
- nailer 9y agoYou know bash has /dev/tcp right? Not saying either is OK, just that they both do this.
- stinos 9y agoYou can hardly call cmd.exe a candidate for Bash resemblance. If you want that you should be looking at cygwin and the likes.
- jhasse 9y agoIt's good enough for the few times I use Windows. For example stuff like make && ./output works. Git works from it. Also with clink (https://mridgers.github.io/clink/ https://mridgers.github.io/clink/ ) it becomes even more similar. But you're right: For the times where you need more, you should fire up MSYS2 for example.