Live data from Hacker News

Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

news.softpedia.com

161–170 of 350 posts

Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

#161
post #144

Earlier quoted context omitted.

Whilst I am glad to hear about ConEmu; I have to disagree, I use windows cmd.exe very regularly, and know lots of other people that do, and I have never used ConEmu before! I might give it a try now I know about it.

Cmder is a good configuration bundle for ConEmu and a better place for new users to start.

Cmder seems cool but it's ConEmu + Clink + git for windows.

- Clink is for cmd what PSReadline is for posh.

- posh-git does what git for windows does (I personally don't like git info in my prompt, so use neither, and have a custom, Unixy-one)

Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

#162

Earlier quoted context omitted.

No, Windows does not decide whether files are executable by looking at their name.

Windows just failed on running my text file because it didn't have the correct header.

"is executable" is different from "is an executable". Your other comment was worded to say the former, while this one seems to refer to the latter.

For example, a .jpg image can be marked as executable, but it is not an executable. This can happen on both Linux and Windows, and I believe it is handled by the filesystem. I supposed the term "marked as executable" could be used for this, while "is executable" could mean the OS will grant it a PID using the correct system call, but this is uncommon.

On Linux, you can attempt to execute any file using a system call like execve(). Similarly, on Windows you can also attempt to run a JPEG using CreateProcess(). I know the Windows shell probably won't run a JPEG even if it is marked executable(there are a collection of Registry entries that map file extensions to programs that run them, for the shell), but I don't know if the CreateProcess() API function rejects files without the correct extension.

If both CreateProcess() and GetBinaryType() fail to detect a PE file with the incorrect extension, then you can reasonably say that Windows uses the extension to determine whether a file is an executable(though not whether it is executable). The behavior of the shell isn't sufficient.

Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

#164
post #27

Btw did anyone noticed that in windows 10 you can resize cmd.exe to more than 80 characters width! When I first saw it I almost cried.

Drag-resize (affecting buffer, as well) is nice, finally. And you can change opacity in properties, making your window transparent. What I really like though: you can now use Shift + arrow keys to select text and C-c/C-p to copy/paste.

If you're going to use CMD/PS on windows you might go whole hog and install ConEmu. Then load it up with Cygwin, and DosBox.

ConEmu can even integrate stuff like Putty.

Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

#165
post #131

Earlier quoted context omitted.

IIRC you could resize the standard cmd console easily, just type "mode 160" (or whatever width you want). I don't have a Windows installation around to check it, but maybe someone can confirm?

Yes, that is correct. Display mode: MODE CON[:] [COLS=c] [LINES=n]

TIL. Thanks very much.

Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

#166
post #134
post #27

Btw did anyone noticed that in windows 10 you can resize cmd.exe to more than 80 characters width! When I first saw it I almost cried.

Most Windows terminal people use ConEmu rather than the inbuilt terminal apps - it's like iTerm2 vs Terminal.app on MacOS. ConEmu adds Unix style cut and paste, tabs, etc. Add openssh, PSReadLine and PSCX and you've got a proper terminal setup. Also MS should really improve the inbuilt apps to do this stuff.

I've used iTerm and Terminal on Mac, and the default Windows Terminal (conhost), PuTTY sand MinTTY on Windows.

Terminal.app is much, much better than conhost, even after the Windows 10 update. It's fast, supports a ton of thoughtful features (such as customizable title bars via extended ANSI codes, real line wrapping during resize, good Unicode support from the very beginning, etc.). With Terminal.app I can be quite happy and productive even with someone else's Mac or with the default settings. I've used iTerm2 but their features weren't compelling enough for me, and the iTerm font rendering is noticeably worse in many ways. Apple has also been very good about giving Terminal.app continuous updates.

On Windows though I have almost always had to install MinTTY or something just to get a halfway usable terminal emulator. The default emulator is just so limited - Unicode support is very plug and pray, the title bar is totally locked, and having to use Windows APIs to change text formatting is a pain. Conhost is also amazingly slow when it comes to large amounts of text, so much so that printf can be extremely detrimental to program performance just because it has to wait for the terminal window to catch up.

PowerShell's terminal experience is better but not quite there. And, PS suffers from extremely long load times - I've seen it take upwards of 10 seconds to start without any extensions. That means that in practice I often pop open cmd.exe even if PS is a better choice, just because I don't want to sit through a long load time.

Microsoft really should get their Terminal story in order. I'll definitely try out ConEmu the next time I sit in front of a Windows box, but like you I wish MS would improve their own apps!

Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

#168

Earlier quoted context omitted.

Wait, the Linux subsystem on Windows inherits that stupid convention of deciding if a file is executable by its name?

No, Windows does not decide whether files are executable by looking at their name.

It's GUI shell does. Theoretically you can create a process from any binary blob. But to invoke it the gui way you need to have it either with an .exe or another self executing ext defined in the registry.

Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

#169
post #144
post #134

Earlier quoted context omitted.

Most Windows terminal people use ConEmu rather than the inbuilt terminal apps - it's like iTerm2 vs Terminal.app on MacOS. ConEmu adds Unix style cut and paste, tabs, etc. Add openssh, PSReadLine and PSCX and you've got a proper terminal setup. Also MS should really improve the inbuilt apps to do this stuff.

Whilst I am glad to hear about ConEmu; I have to disagree, I use windows cmd.exe very regularly, and know lots of other people that do, and I have never used ConEmu before! I might give it a try now I know about it.

I highly recommend ConEmu, I've used it for awhile.

Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

#170
post #134
post #27

Btw did anyone noticed that in windows 10 you can resize cmd.exe to more than 80 characters width! When I first saw it I almost cried.

Most Windows terminal people use ConEmu rather than the inbuilt terminal apps - it's like iTerm2 vs Terminal.app on MacOS. ConEmu adds Unix style cut and paste, tabs, etc. Add openssh, PSReadLine and PSCX and you've got a proper terminal setup. Also MS should really improve the inbuilt apps to do this stuff.

I use Windows since version 3.1 and never bothered with it.

Properly configuring cmd.exe was enough for me. Then again I only use the terminal on "as required" basis.

Post reply on HN