Live data from Hacker News

How bad is the Windows command line really?

blog.nullspace.io

71–80 of 110 posts

Re: How bad is the Windows command line really?

#71
post #62
post #55

It's really, really, really, really really bad. It doesn't even have a logical history. Despite having used it for many years, I still don't understand why when I type one command (eg make), and then another (eg out.exe), I have to toggle between pressing up or pressing down from the new command-prompt to access the previous commands. I can't make the window more than 80-characters wide dynamically. (I don't want to…

Joining in the "I agree, but..." > It doesn't even have a logical history. Despite having used it for many years, I still don't understand why when I type one command (eg make), and then another (eg out.exe), I have to toggle between pressing up or pressing down from the new command-prompt to access the previous commands. With readline-style editing, as in bash, when you go back to an earlier command and re-run it, i…

(replying to myself!)

> I also genuinely like PowerShell

To expand on this. As a Unix user with decades of experience writing shell, I find it easier to write a shell script than a PowerShell one for any given job. But I am a lot more confident that the PowerShell one will work correctly.

I take care with argument handling and the like in my scripts, but I still feel that testing a shell script with a specific set of inputs only really tells me whether it works with that set of inputs. It's almost certainly possible to craft an alternative set of inputs that will break it. I don't feel that way about PowerShell.

On the other hand, I do find it much easier to reason about performance with shell scripts. Their simple streaming structure parallelises well and the individual commands have generally predictable performance and scaling characteristics. I'm a lot less confident about that aspect of PowerShell.

Re: How bad is the Windows command line really?

#72

Personally, one of the reasons why I fell in love with Ruby 10+ years ago was because I realized I could use it instead of CMD or bash to write all my scripts from now on. Regardless of the platform. Obviously, this applies to Python as well if that's more your thing. I've never gotten into PowerShell but I have absolute respect for the concept behind it, and how much more advanced it is than any shell you can find o…

> you are now piping real language objects Which is in fact a bad idea, because in order for stdin to accept objects and stdout to output objects, now those commands have to be powered by PowerShell and .NET. In other words you're in a very finite and closed environment that does not interoperate with the outside world. You know, love or hate Unix, but the fact remains that this family of operating systems, including…

Those who don't understand Unix are doomed to repeat it.

Re: How bad is the Windows command line really?

#74

Earlier quoted context omitted.

I agree it's pretty bad. But... > I can't make the window more than 80-characters wide dynamically. Windows 10 fixes this. You can resize the window and it wraps text better than any other terminal out there. > Copy-and-paste as well is just complete garbage that takes forever. Turn on Quick Edit. Now drag to select and right click to copy. > There's no tab-completion. Tab completion for filepaths works quite well fo…

> Turn on Quick Edit. Now drag to select and right click to copy. Command line + mouse = GUI, not command line.

I'm curious, how do you copy and paste in Bash without a GUI?

Re: How bad is the Windows command line really?

#75
post #62
post #55

It's really, really, really, really really bad. It doesn't even have a logical history. Despite having used it for many years, I still don't understand why when I type one command (eg make), and then another (eg out.exe), I have to toggle between pressing up or pressing down from the new command-prompt to access the previous commands. I can't make the window more than 80-characters wide dynamically. (I don't want to…

Joining in the "I agree, but..." > It doesn't even have a logical history. Despite having used it for many years, I still don't understand why when I type one command (eg make), and then another (eg out.exe), I have to toggle between pressing up or pressing down from the new command-prompt to access the previous commands. With readline-style editing, as in bash, when you go back to an earlier command and re-run it, i…

> I think it's pretty logical and I actually quite like it (after the first half an hour of familiarisation, each time I have to use it). It's just different.

Interesting! I never realized the logic behind it, thanks for expanding on it.

I definitely don't care for it at all. Much easier for my mind to think of the list of previous commands as a straight list, than trying to conceptualize 'where I am at' in my list of previous commands, and how executing a new command would then jump me somewhere else entirely. But I'll respect your difference of opinion.

Re: How bad is the Windows command line really?

#76

The cmd.exe on Windows 10 is a significant improvement from older versions. So much so that it has become actually useful now.

I think you're thinking of conhost which is the console window program used to run cmd.exe, PowerShell, et al. That has some new features. But I don't cmd.exe itself saw many, if any changes in Win10.

Re: How bad is the Windows command line really?

#77
post #34
post #15

Agree about Windows command prompt being lame compared to bash, but I really find PowerShell amazing, even more so then bash. If you look at all the recent (even not so recent) products from MS, it is clear that PowerShell is the shell for Windows, and not batch. I didn't get the cure for polio analogy that's in the article but I really think anyone that's comparing shells should compare with PowerShell.

You're on Hacker News. Most people who say they hate powershell have done so little posh they don't even know 'select' or 'where'.

Nobody starts using posh just because some new cool thing in the shiny new OS.

My first impression of it? It went like this:

Task: you need to connect to Hyper-V VM console via Remote Desktop.

Hiccup: for that, you need to know it's GUID. How to find it out? Just run this handy posh script... (https://blogs.msdn.microsoft.com/virtual_pc_guy/2014/11/25/u...)

Another hiccup: That script does not work, it needs some library that's not loaded by default. Try to find out how.

Another hiccup: It does not load, because it breaks some policy, that's off by default. Investigate, what to do.

How it ended: forget it, I have better things to do than solve problems with Powershell. Look into VM files and find out, that it's one of the GUIDs there.

Result: Won't touch posh again and anyone singing about its virtues is getting promptly ignored.

Maybe it's not fair to Powershell, but the first impression counts.

Re: How bad is the Windows command line really?

#78
post #55

It's really, really, really, really really bad. It doesn't even have a logical history. Despite having used it for many years, I still don't understand why when I type one command (eg make), and then another (eg out.exe), I have to toggle between pressing up or pressing down from the new command-prompt to access the previous commands. I can't make the window more than 80-characters wide dynamically. (I don't want to…

I agree it's pretty bad. But... > I can't make the window more than 80-characters wide dynamically. Windows 10 fixes this. You can resize the window and it wraps text better than any other terminal out there. > Copy-and-paste as well is just complete garbage that takes forever. Turn on Quick Edit. Now drag to select and right click to copy. > There's no tab-completion. Tab completion for filepaths works quite well fo…

> Windows 10 fixes this. You can resize the window and it wraps text better than any other terminal out there.

Don't want to derail with Windows 10 arguments, but for me, that's a total deal breaker at this time. But thanks for pointing it out! Now if I find out Windows 10 can handle LF-formatted text in Notepad, I'll have to check and see if Hell froze over :P

> Turn on Quick Edit. Now drag to select and right click to copy.

It's not just having to go to the menu to click edit, it's that it bounds selections as a rectangular box when you paste the results. I also don't like the way quick-edit is so quick to select white blocks just by clicking in the window without dragging. Then to get rid of it, I have to right-click and kill whatever was in my clipboard. A bit OCD there, but ... I like bash a whole lot more. Normal text highlight, middle-click to paste what was highlighted elsewhere, and it's formatted properly. This is especially important when copying those 200-character long C++ template error messages.

> Tab completion for filepaths works quite well for me.

...... indeed there is. How in the world did I miss this?! Very sorry, I can't edit the parent post to fix this now.

Re: How bad is the Windows command line really?

#79

Earlier quoted context omitted.

> Turn on Quick Edit. Now drag to select and right click to copy. Command line + mouse = GUI, not command line.

I'm curious, how do you copy and paste in Bash without a GUI?

It's not about GUI, but about not using mouse.

Re: How bad is the Windows command line really?

#80
post #46

I honestly feel like I am missing something. What is the current excitement about bash on Windows? It's been available (and something I commonly use) via cygwin for years. And cygwin's bash can run .exe binaries.

Cygwin apps have to be compiled for Cygwin, as opposed to this Bash on Windows thing that runs Linux binaries out of the box :-)
Post reply on HN