Live data from Hacker News

Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

news.softpedia.com

131–140 of 350 posts

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

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

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?

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

#132
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

That's a bad idea - the inbuilt 'ls' (aka get-childitem - it also works on registry paths) will output real file objects, with properties you can access with 'select' and 'forEach' etc, whereas the GNU tool will output text you'll have to scrape.

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

#133
post #11

So basically instead of doing dir C:\ I have to learn to type List-Directory-With-Files Drive=C Folder=/ (made up example, but you get the point)

Add posh-HumpCompletion https://github.com/stuartleeks/posh-HumpCompletion then you just need to type first Caps and hit tab

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

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

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

#135
post #131
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.

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]

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

#136
post #88

Earlier quoted context omitted.

Well, the nice thing in PowerShell is that you have explicit control over "stop parsing here and just pass the rest to the application verbatim" with --%. Solves a lot of quoting nightmares.

That's indeed nice. I wonder if there is something like that for ZSH.

I don't know for sure about ZSH and can't test it at the moment, but Bash has -- for this purpose. It may work in ZSH as well.

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

#137

Earlier quoted context omitted.

How is that any different from Linux distributions camping their default shell? Like back when debian changed their default shell to dash I don't remember anyone saying you should stay away from debian, even though it broke a lot of existing scripts.

Did you have a choice to upgrade? Could you reinstall the old version of you wanted? Windows has stripped that power from users.

What power was stripped? Cmd.exe is still there.

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

#138
> Starting with Windows 10 build 14971, Microsoft is trying to make PowerShell the main command shell in the operating system.

> As a result, PowerShell officially replaces the Command Prompt in the Win + X menu, so when you right-click the Start menu, you’ll only be allowed to launch the more powerful app.

This is an older change - I have this behavior in 10.0.14393.0 (ie, current stable).

cmd launching posh is new though.

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

#139
post #138

> Starting with Windows 10 build 14971, Microsoft is trying to make PowerShell the main command shell in the operating system. > As a result, PowerShell officially replaces the Command Prompt in the Win + X menu, so when you right-click the Start menu, you’ll only be allowed to launch the more powerful app. This is an older change - I have this behavior in 10.0.14393.0 (ie, current stable). cmd launching posh is new…

There's an option in the Taskbar settings: »Replace Command Prompt with Windows PowerShell in the menu when I right-click the start button or press Windows key+X«. I suspect the default value for that setting has been false, so far.

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

#140

How does PS compare to installing cygwyn and using bash ? (from a Linux user perspective) does it support grep, find, ls, PS, pipes, etc?

Windows 10 actually has some fancy linux emulation stuff ( https://insights.ubuntu.com/2016/03/30/ubuntu-on-windows-the... ). Personally I wanted to like PowerShell but its syntax and semantics were infuriatingly confusing.
Post reply on HN