I develop on Windows and use cmd.exe daily (for simpler tasks like running Gulp or PhantomJS). It's hard to overstate how much of an improvement Windows 10 brings to the command line. Keyboard cut and paste, resizing, better text selection seem so wonderful. It's a crime it took Microsoft this long for these simple features. There's also other handy improvements, like typing "cmd" into the file explorer location bar…
Yes! I joined Microsoft 2 years ago, prior to that was on OS X. I couldn't believe how awful cmd.exe was. It was like if a college student half implemented some homework assignment and we all had to use it. I tried using cygwin, PowerShell, and other shells but that was hard because too much of my day to day work depended on shared scripts that I would have to manually update for my shell. So I was stuck with cmd.exe and it was miserable.
Windows 10 fixed that with the improvements you mentioned. It's still no "Terminal", but it's now about 80% as good, instead of 1%.
> The script was 11 lines long (vs 3 lines in Python), it was harder to read and understand. Note that this might be true for one script, and the opposite might be true for another script. Something is saner in bash, something is better in PS. They have fundamental differences (text- vs. object-based), and neither of them is better than the other in all scenarios. (At least that's my experience.)
I think it's worth noting that powershell is .NET object-based. This means you can interact with powershell objects from a .NET language but not, for example, python. To me this is the fundamental flaw of PS. It's a neat idea as long as you stay within their box, within their ecosystem. With Bash you get a wealth of tools because everything can handle text.
PowerShell objects are actually a superset of . Net objects. They can also represent COM objects, WMI objects, XML nodes, etc. You can also export them to CSV, XML, JSON, and yes, even text. If you have cygwin installed you can pipe to and from the cygwin commands from PowerShell and pipe to and from powershell.exe from your cygwin shell.
I tried both ConEmu (twice) and Console2 in the past, but both were too unstable for regular use. If someone can convince me that the situation has markedly improved, I might try again, but I guess I'll just wait until we upgrade to Windows 10 at my workplace (which they say is any day now).
I'm using ConsoleZ now. It's the successor of Console2; I have had no problems with stability.
> Some of it stems from the fact that i just don't use it enough, but most of it from the fact that this shit just isn't intuitive. I have exactly the same problem. I use Linux since about 8 years but somehow I just don't use the commandline very often so I forget stuff all the time. Because of this I have half a dozen post-its glued to my monitor for all the grep/git/whatever tricks I just can't keep in my head. And…
Holy shit git! I need to reset my git repo to match origin, is it git reset hard --HEAD or git reset HEAD --hard? I'm like 90% sure they switch it with every update.
For rare commands that are repeated every so often history search comes in handy.
>> Let's be honest. What many people think of as "the default Windows command line", cmd.exe, is atrociously bad. Selection is awkward, resizing is hard, the syntax is arcane, the list goes on. If you do nothing else, there are two things you can do to make the basic, vanilla experience bearable. Funny, from a guy coming from Windows to Unix I think the exact opposite. Each command comes with a bazillion options and…
This is the Android vs Apple paradigm. Customization available to a fault vs "appliance" that just plain works... Each has their strengths and pain points. There's a reason normal people use Windows and Power Users gravitate to Linux.
I'm a power user and I work in Windows(+Python). I absolutely hate compatibility issues on stupid stuff that plague almost every Linux distro. And when there aren't (oh the rare few cases), then you have to compile half the libraries in the system again (take the hint, Debian!). The only distro that was bearable was Mint, and then we got the poisoned ISOs.
So, Windows+Python it is. If you really miss the command line utils, theres the GNU Core Utils package to solve your life (though pipes still behave slightly different and that may show in a contrived command).
>> Let's be honest. What many people think of as "the default Windows command line", cmd.exe, is atrociously bad. Selection is awkward, resizing is hard, the syntax is arcane, the list goes on. If you do nothing else, there are two things you can do to make the basic, vanilla experience bearable. Funny, from a guy coming from Windows to Unix I think the exact opposite. Each command comes with a bazillion options and…
I remember a while ago, being a kid, visiting some relatives, when I've asked my guest elders why our host relatives have so many ignored problems scattered around. They discretely told me that our hosts got used to and that don't notice those anymore. This is how our mind works. In order to get out of problem blindness one may have to cure her senses or the said problems have to grow past the bearable levels. You have the gift of having clean senses, for now.
Why use bash when you can use Python with os and sys modules?
I prefer Python when appropriate, but if you're going to "shell out" a lot and pipe a bunch of commands together it starts getting too verbose and loses it's elegance. I agree with other posters that bash is not intuitive, but if you've worked with it for a long time, there's nothing like being able to cat | grep | sed in a one-liner, rather than creating a bunch of Process objects, etc.
If you're doing cat, grep, sed I'd say that bash is very intuitive and I use it for that purpose all the time. If you're writing bash scripts, with if structures and loops and everything, then just python.
> The script was 11 lines long (vs 3 lines in Python), it was harder to read and understand. Note that this might be true for one script, and the opposite might be true for another script. Something is saner in bash, something is better in PS. They have fundamental differences (text- vs. object-based), and neither of them is better than the other in all scenarios. (At least that's my experience.)
I think it's worth noting that powershell is .NET object-based. This means you can interact with powershell objects from a .NET language but not, for example, python. To me this is the fundamental flaw of PS. It's a neat idea as long as you stay within their box, within their ecosystem. With Bash you get a wealth of tools because everything can handle text.
Googled "powershell ironpython" and got this[0] as first result. Before that, I was going to point out that IronPython, despite it's performance issues and nitpicky differences (there's no 'struct' module, but there's '_struct', which is... struct and they somehow forgot to rename) is still considered a .NET language.
If there's anything wrong with the article (for one thing, it's 4 yo), please point it out. I just brought this up because the IronPython part of .NET is usually forgotten, though still there and has some interesting uses.
I tried both ConEmu (twice) and Console2 in the past, but both were too unstable for regular use. If someone can convince me that the situation has markedly improved, I might try again, but I guess I'll just wait until we upgrade to Windows 10 at my workplace (which they say is any day now).
I've been using ConEmu for a while and have had no issues with it as far as I can remember.
I think it's worth noting that powershell is .NET object-based. This means you can interact with powershell objects from a .NET language but not, for example, python. To me this is the fundamental flaw of PS. It's a neat idea as long as you stay within their box, within their ecosystem. With Bash you get a wealth of tools because everything can handle text.
> With Bash you get a wealth of tools because everything can handle text. And no autocomplete.
Unix command line autocomplete is fairly good, but it's not useful for discovery of new features or for helping you figure out a CLI without reading anything. It is quite effective at helping a user who knows what they're avoid keystrokes, though.