Live data from Hacker News

How bad is the Windows command line really?

blog.nullspace.io

91–100 of 110 posts

Re: How bad is the Windows command line really?

#91
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 have to dump batch files into a folder in PATH because there's no alias support nor .profile startup script."

https://msdn.microsoft.com/en-us/library/windows/desktop/ms6...:

"Console aliases are used to map source strings to target strings. For example, you can define a console alias that maps "test" to "cd \a_very_long_path\test". When you type "test" at the command line, the console subsystem expands the alias and executes the specified cd command. To define a console alias, use Doskey.exe to create a macro, or use the AddConsoleAlias function."

https://www.microsoft.com/resources/documentation/windows/xp...:

"Executing registry subkeys

If you do not specify /d in string, Cmd.exe looks for the following registry subkeys: HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun\REG_SZ HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun REG_EXPAND_SZ If either one or both registry subkeys are present, they are executed before all other variables."

"There's no shell escaping backticks."

https://technet.microsoft.com/en-us/library/bb490909.aspx:

"Iterating and file parsing Use file parsing to process command output, strings and file content. […] for /F ["ParsingKeywords"] {%% | %}variable in ('command') do command [CommandLineOptions]"

Good UI? I've seen better. It also doesn't affect the conclusion that the cmd shell is bad, but the functionality does exist in some, often weirdly limited, form.

Re: How bad is the Windows command line really?

#92
post #82
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 still don't understand why [..] I have to toggle between pressing up or pressing down from the new command-prompt to access the previous commands. It is because the shell history has its own completely invisible cursor, and the cursor is not reset after a command. So when you press three times, then press , your history cursor is still at -3 (actually, -4). If you then want to move to command -2, you need to press…

Playing with the F7 key in your command shell (https://msdn.microsoft.com/en-us/library/windows/desktop/ms6...) will likely help you gain insight, if only temporarily.

Re: How bad is the Windows command line really?

#93
post #90
post #78

Earlier quoted context omitted.

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

>Don't want to derail with Windows 10 arguments, but for me, that's a total deal breaker at this time. I'll bite. What's holding you back? Ever since 7 / 8.1 got telemetry backported in, they're on equal footing with 10 from a privacy standpoint. I guess you could cherry-pick out which windows updates you want to install, but that's frankly unsustainable. You may as well get the new WDDM, the new DirectX 12, the new…

> Ever since 7 / 8.1 got telemetry backported in, they're on equal footing with 10 from a privacy standpoint.

I primarily run FreeBSD. But when I run Windows, it's a fresh SP1 install with updates disabled. I am not worried about the safety of it. I have a firewall, behind a router, and I don't install much of anything. I just use Windows for chatting and browsing online, watching streaming media services, etc. If something were to become compromised, I'd just wipe the drive with nothing of value lost or stolen in the process. I have another Windows box that doesn't even have internet access that is solely used to build and release Windows ports of my software.

Telemetry is part of it. I also find the interface ugly as sin (duller than Windows 3.1), don't like how bloated it's becoming (Metro tiles, Cortana, etc), don't like how difficult it is to disable updates, etc.

To be honest, if I had my way, I'd be on Windows XP (classic mode) still for what I use Windows for. The main draw to 7 was that XP's 64-bit drivers were mostly garbage or just plain unavailable; and I have lots of RAM and like the speed boost for 64-bit software too much.

> Love your work by the way.

Thank you very much! But ...

> bsnes/higan is a significant contribution to the human race.

I don't know about all that o_O'

At the end of the day, it's just video games.

Re: How bad is the Windows command line really?

#94
post #86

I usually write shellscripts in PHP. Works pretty good, and PHP is by far easier to write than either bash scripts or Windows shell script - not to mention that one single syntax can be used for both OSes, which is nice when you do development on both Linux and Windows, and even nicer when you're also developing on OS X which ships a horribly outdated bash (and other coretools).

I am by no means a PHP hater (I do some PHP dev for work) but PHP not only has multiple versions (4, 5, 5.3) but has a ton of modules for everything (curl, mbconv, openssl, etc) that have to be setup the same way for you to get the same behavior across OSes. Not sure it makes a great shell script for that reason.

On systems I control, I currently stick with the latest PHP5 release, unmodified - either the distro maintainer version, or in case of Windows, the official binaries.

Configuration customization isn't really needed, only the usual date.timezone to get rid of the warning (and hell, this is annoying! can't PHP just use the OS-provided time zone?!), and in extremely rare cases the memory limit and max_execution_time.

Re: How bad is the Windows command line really?

#95
post #34

Earlier quoted context omitted.

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 l…

Totally agreed the default policy thing (you can't run scripts until you allow it) can be a nasty shock, especially to folk (like me and everyone else here) coming from Unix.

OTOH, you'll spend way less time scraping stuff for regexs and actually just asking posh for fields. It's really, really worth learning.

Re: How bad is the Windows command line really?

#96

Earlier quoted context omitted.

Have the line ending wars ended yet? Apple is finally Unix \n, but most internet protocols are \r\n as are Windows. Though honestly, Windows just doesn't even matter any more to me, I haven't needed to touch an MS product in years...

https://en.wikipedia.org/wiki/Newline#History \r\n, CR+LF historically speaking was the first, but \n, LF became dominant because of Unix.

\r\n has always seemed redundant, regardless of the standards.

I get using \r without \n for fun rewriting of a current line of text on a terminal.

But has anyone (in recent years) honestly want a new line, without a carriage return?

And why did all the internet protocols settle on this? It's an extra 8bits that are unnecessary.

Re: How bad is the Windows command line really?

#97
post #56

Earlier quoted context omitted.

https://en.wikipedia.org/wiki/Newline#History \r\n, CR+LF historically speaking was the first, but \n, LF became dominant because of Unix.

If you break it down and view them as terminal codes (or as the spec was designed, on a teletype), CR+LF is correct, and LF is not. However, the inconsistencies of this over time have become really annoying. My long term pet peeve is in VB.NET when I have to do this: ' This works - using the VB6 interop Split(StringName,vbCrLf) ' This doesn't work - using the native .NET function ' because .split is only expecting a…

Why would you want strings to be formatted using terminal codes? It's just textual data. It has nothing to do with terminals, other then the fact that terminals need to handle text. I see little reason that text should have to handle terminals.

With that said, CR+LF is just inefficient, since doing both of those tasks together is what is overwhelmingly desired for a newline.

Re: How bad is the Windows command line really?

#98
post #65
post #59

Earlier quoted context omitted.

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.

They did pass it by, and it was down-voted for its irrelevance to the vast majority of users. Then you went and complained about down-votes (with a dismissive insult, no less), like that was an acceptable response.

If you make a post that most people don't need to see, then don't worry about the down-votes. When you're getting down-voted for writing something most people do need to see, then there's a problem.

Re: How bad is the Windows command line really?

#99
post #89

Earlier quoted context omitted.

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

Let's say you want to copy and paste something from an earlier command line entry and put it in a new command line entry: % set -o vi % # hit ESC to go into vi cmd mode, hit k a few times until % # you get to this old command in your command history: % longasscommand -with -params -i super.dont -w ant2 -type in -again % # you want just the stuff from -params to ant2, so you % # type "f-n" to get the cursor to -params…

>set -o vi

I don't know how I lived without knowing that this is a thing.

Re: How bad is the Windows command line really?

#100

Earlier quoted context omitted.

Even if the *nix machine was no bigger than a PC (e.g. - Xenix on '286; BSD on a PDP-11), it could still swap out processes, vs sharing a single real memory space. But as you said, this allowed (at least the illusion, on some machines) more total memory to work with.

In the 1980's a 80286 would have been toward the high end of x86 systems. The 80386 started shipping in bulk in 1986 and the Compaq DeskPro 386 and IBM PS/2 Model 80 were well north of $5000 in 1987 and the "prosumer" PS/2 was the Model 60 with a 80286 when the line was released. Even in the late 1980's 8088 based systems were pretty typical and why IBM included the PS/2 25 and 30 in its initial product line.

I remember using (sharing!) an XT (8088? 8086???) at work in 1985. One good thing about the 386 in 1986 was that it made the price of 286 (AT/clone) systems come down. I almost never saw an XT after 1986. We started seeing quite a few more clones (Compaq, etc) about that time, as well.

Which is of course a big tangent off of "why/whence command.com & .BAT files" :-)

OS/2 and Windows were a big deal in virtualizing memory use in PC land, with widespread Linux use still "a few years" in the future. (and effective adoption of NextStep even further out)

Post reply on HN