Live data from Hacker News

Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

news.softpedia.com

101–110 of 350 posts

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

#101
post #76
post #3

"Typing cmd in the run dialog will launch PowerShell as well" What? I'm a big PowerShell fan, but I see the need to keep cmd around for a while. Clobbering it before it's phased out seems problematic.

Microsoft are taking Apple's approach!

Courage!

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

#102
post #56

Earlier quoted context omitted.

There are use-cases where globally removing aliases isn't an option (e.g. scripting for use on a machine that isn't yours). For those, it's also possible to evade the aliasing just by explicitly appending the .exe onto the command. 'pwd.exe' gets you the GNU version.

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

[deleted]

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

#103
post #56

Earlier quoted context omitted.

There are use-cases where globally removing aliases isn't an option (e.g. scripting for use on a machine that isn't yours). For those, it's also possible to evade the aliasing just by explicitly appending the .exe onto the command. 'pwd.exe' gets you the GNU version.

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

No, this is in powershell not the linux subsystem. In powershell they defined a bunch of aliases to internal powershell functions like cp, mv, cat ... that don't work like the original unix version. If you install the GNU version on the system and try to use them in powershell that won't work by default. You either remove the alias or use the trick above to force powershell to use the .exe of the utility.

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

#106
post #35

Something that irks me is how PowerShell’s default aliases take precedence over binaries in the PATH. To be able to use the GNU utils, you have to put this in your profile.ps1 : Remove-Item Alias:cat Remove-Item Alias:cp Remove-Item Alias:curl Remove-Item Alias:echo Remove-Item Alias:ls Remove-Item Alias:man Remove-Item Alias:mv Remove-Item Alias:pwd Remove-Item Alias:rm Remove-Item Alias:wget

The weird thing was that Powershell for Mac doesn't do this.

It's not that weird, they put the alias' in so new admins on windows fresh from linux don't hit a complete roadblock at the first command they type. Its to make powershell less punishing to learn, not emulate a different system.

So imagine when they packaged that for Mac, that assumption is no longer true.

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

#107
post #66

Why ? Because some linux zealots think it's the best option ? Laughable.

Hey, I'm still on Windows desktop after having tried Linux desktop more times than I can count. But to claim that bash (or most other shells) are only preferable to cmd and powershell if you're a linux zealot is what is truly laughable. If you have ever worked with both there would be no question.

I have worked with both and I would not claim that bash is superior to Powershell. I wouldn't even claim that my favorite shell, zsh, which is mostly better than bash, is superior to Powershell.

They're different approaches and the only real benefit of bash is that it's super entrenched and extremely widely supported. With the same level of support Powershell would run circles around it. But since we're comparing things in the real world, Powershell is roughly equivalent to bash for most tasks. Better for some, worse for others.

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

#108
post #56

Earlier quoted context omitted.

There are use-cases where globally removing aliases isn't an option (e.g. scripting for use on a machine that isn't yours). For those, it's also possible to evade the aliasing just by explicitly appending the .exe onto the command. 'pwd.exe' gets you the GNU version.

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.

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

#109
post #82
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.

also CTRL+V pastes by default now, but yea you're no longer locked into half the screen by default. I wonder why that's been like that for so long? Must be some reason...

Console GUI applications. Pretty much any tweak to conhost ever and they'd implode.

I don't know what's changed now but they've rolled that policy away. Maybe virtualization?

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

#110
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.

Lol you could always have done this by setting the command prompt properties -> since at least 3.51 ;)
Post reply on HN