Live data from Hacker News

How bad is the Windows command line really?

blog.nullspace.io

61–70 of 110 posts

Re: How bad is the Windows command line really?

#61
post #5

In computing, "batch" connotes long running processes in addition to "script"'s connotation of collapsing multiple commands into a single one. The seemingly redundant parsing by the Batch interpreter is a feature, not a bug. 1. The parser allows modifying a .bat file during its execution and having those changes execute without restarting the Batch interperter. [1] This is in keeping with the rationale for batch proc…

I remember when I learned that command.com kept the current .bat file open when running it, rather than reading it into memory (like most other interpreters that I used or learned at school). We had a client on a Novell network with a menu program that generated .bat files to start the program selected, then restart the menu program. This turned out not to work very well on a multi-user network, as user A would exit an app, and continue running the .bat at some offset, which user B would now have caused to have different content, and probably not even a line break at said offset into "THE" file.

Easy enough to fix by having the menu program put the run script (.bat file) into the Novell equivalent of each user's home directory, but it was a real WTF moment at first :-)

Re: How bad is the Windows command line really?

#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, it is added to the end of the history and your "position" in the history is reset to the end. So if you want to go back to an earlier command again, you always hit "up".

In cmd.exe, when you go back to an earlier command and re-run it, you are simply going back to that earlier position in the history. When you run it, your location in the history is now immediately after the command you just ran. So to run the following command again, you now hit "down" rather than "up".

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.

I also genuinely like PowerShell, but I'm with you on everything else.

Re: How bad is the Windows command line really?

#64
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…

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

Command line + mouse = GUI, not command line.

Re: How bad is the Windows command line really?

#65
post #59
post #29

Earlier quoted context omitted.

Great, dowvoted for reporting a problem. Typical HN.

Right, because HN is the customer service department for the site hosting the article that somebody submitted a link to. And because "unreadable on mobile" is such an informative statement that contains so much useful data about why it was hard to read and what it was hard to read on. Surely you weren't downvoted for those reasons. Nah, it's just HN being HN.

It is informative enough for an author (if he's around) to take an action. Anyone else should just pass by, nothing to see here.

Re: How bad is the Windows command line really?

#66
post #29

Earlier quoted context omitted.

Great, dowvoted for reporting a problem. Typical HN.

Perhaps someone felt that the page layout was far enough off topic as to be a distraction or otherwise reduce the quality of the discussion. Personally, I've found treating unexpected downvotes as editorial feedback on the quality of my writing helpful. I just assume that: 1. I didn't make my point clearly 2. My comment was low quality 3. Someone just disagrees with the point In the first case, I edit or delete it. I…

Despite being interested in this topic, I simply could not even read the article. Guess it is a legitimate contribution to a discussion to warn about this issue.

Re: How bad is the Windows command line really?

#67

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…

If we wanted an OO shell we'd be using one. It's not like Unix has a shortage of interpreted languages. The simple fact is that these languages are too high-level to be even remotely useful as a system shell.

Re: How bad is the Windows command line really?

#68
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…

The quick edit copy is ridiculous, it inserts newlines between one line of output if it wrapped instead of obligingly copying the content as it was sent to stdout. The selection mechanism makes nearly no sense, why would I want to select text by a rectangle?!

Re: How bad is the Windows command line really?

#69
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'm not going to argue that it isn't bad, because it is, but it does have tab completion - not sure what you mean there.

Also, you can use F7 to browse your command history - that may help a bit.

Post reply on HN