Live data from Hacker News

Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

news.softpedia.com

31–40 of 350 posts

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

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

I've been able to do that in versions of Windows going back as far as I can remember.

They made the option easier to find.

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

#32
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)

Both DIR and LS do list directories in PowerShell. But all parameters on DIR and LS seem to result in errors, even "dir /h", "dir /?", "dir -h", "dir --help", etc. That is a bit annoying.

help( / man / Get-help) dir brings up the help menu for Get-ChildItem

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

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

I don't remember ever not having that feature, so it must be around ever since XP. Right click window -> Properties -> Layout.

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

#34

Just another reason to stay away from Windows as a platform. Windows 10 is a moving target if you are trying to work with it.

Your .bat files still work, and you can use the legacy terminal if you I insist. All they did was change the default terminal from the archaic one to newer one they first introduced as a the non-default option only a mere decade ago.

There is no reason to be dramatic.

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

#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

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

#36

Just another reason to stay away from Windows as a platform. Windows 10 is a moving target if you are trying to work with it.

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.

That's a bit different. The change only exposed that some scripts were already broken and worked by accident. Specifying that your script should be run with #!/bin/sh and then using bash syntax is what broke them. It's a bit like naming your files something.c, writing the code in C++ and compiling with `cc` just because `cc` happened to be linked to `c++` on your system. It will work for you, but don't be surprised when you distribute the source and people have problems using it.

Scripts that used #!/bin/bash still worked, scripts that actually used only sh syntax and #!/bin/sh still worked.

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

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

My work laptop still runs Windows 7 - and will for the foreseeable future - but that is one of the things that make me curious about Windows 10. It is, of course, easy to ridicule Microsoft for how long it took them to change this, but I think better late than never.

(On older versions of Windows, ConEmu[1] does that, too, but it's third-party software, of course. It also supports tabs!)

[1] https://conemu.github.io/

Post reply on HN