Live data from Hacker News

Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

news.softpedia.com

181–190 of 350 posts

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

#181
post #167

I know we have machines with lots of RAM now, but at 90-100MB (PS) vs 4MB (CMD) [1] RAM usage per instance (not counting the conhost instance that also spawns), I think I would still want CMD around. [1] Quick check done on my Win7x64 laptop.

Does that really affect you in any way? (And I'm really asking, not trying to be snarky, I've got 64gb on my main dev machine so I really don't know...)

I can't imagine any scenario in my actual usage where I'll have 4mb (plus whatever is needed to actually do the work) but not 100mb (plus whatever is needed to actually do the work).

Also, on my machine (windows 10 stable branch) each PS window takes up about 20mb (at least the task manager is telling me that, I didn't dive any deeper)

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

#182

Earlier quoted context omitted.

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.

I would argue that for scripting portability, this should be the same. With wget equivalent in Powershell being so different for example, scripts that use aliases will be broken.

Granted, don't use aliases in scripts and all that.

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

#183
post #75

Earlier quoted context omitted.

https://technet.microsoft.com/en-us/library/dn167709.aspx > Every idea for a feature starts out with an imaginary deficit of -100 points. That means it has to demonstrate a significant net-positive effect on the product as a whole in order to emerge as being truly worthy of consideration.

That is actually pretty interesting, thanks for linking! I still dont understand how this was not "fixed" years ago, sure some config windows have fixed widths because it makes sense, but something as a terminal obviously needs the ability to grow (or shrink), especially after they introduced sticky windows and people actually used "tiling"

The idea that the console screen is an MxN matrix is pretty embedded in the API... it's not a MDA display adapter metaphor, not a Unix-style typewriter. I'm guessing they just felt they had bigger fish to fry.

(Everybody I know that uses the console window a lot has always just set the window to 120x9999 or 160x9999 or whatever and forgotten about it. It's one of those things that's obviously kind of lame, but after a while you just forget about it.)

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

#184
post #98

Earlier quoted context omitted.

Then don't make them aliases, if they're not the same. The issue already happened with cURL.

They are aliases for Get-Children. Just like you can have an arbitrary alias for anything on UNIX. If I so pleased I could make an alias so that when I wanted to delete a file I'd type emacs some-old-file-i-dont-want.c Emacs would be an alias for rm on my system. That being said I think it was quite offensive of MS to use wget and curl as aliases, even though they may have had no ill intentions. I'm ok with using ls…

> I'm ok with using ls and echo and names of other such basic commands as aliases, but with tools like wget and curl that are known for their vast array of useful features

Well, I can't do my typical ls -la either.

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

#185
post #22

Earlier quoted context omitted.

PowerShell is fully backwards compatible with cmd. Try again.

No, it's not. PowerShell has aliases like 'dir' and so forth, but it's definitely not compatible. This will break a bunch of legacy stuff. That stuff probably deserves to be broken; the cmd.exe syntax has always been pretty disgusting.

Yeah, to hell with legacy stuff. Legacy stuff is why we can't have nice things.

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

#186
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?

The key here is not so much the ".exe" suffix as that it's not "pwd". Think:

  alias some-command='some-command.sh --arg'
and then running "some-command" versus "some-command.sh". (The Window's shell does interpret stuff with the ".exe" suffix differently, just it's not the key factor here.)

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

#187
post #26

Earlier quoted context omitted.

Sure, go ahead, ruin my joke :) More seriously, how many seconds did it took for the PS to answer to that command?

Measure-Command {dir C:\} TotalMilliseconds : 2.9708 Measure-Command {Get-ChildItem "C:\"} TotalMilliseconds : 2.4161

    Measure-Command { gci C:\ }
    TotalMilliseconds : 1.3334
It's pretty fast

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

#188
post #159

Earlier quoted context omitted.

They're not removing cmd the console host. If you shift-right-click a folder the context item is powershell now instead of command prompt.

The article would partially disagree with you: > Typing cmd in the run dialog will launch PowerShell as well, so Microsoft has made a significant step towards phasing out the traditional Command Prompt. Imho that sounds like stupid idea (and I like PS).

Currently powershell just shells out to cmd.exe to run normal command line apps And handle text streams anyway. How would that work?

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

#189
post #26

Earlier quoted context omitted.

Sure, go ahead, ruin my joke :) More seriously, how many seconds did it took for the PS to answer to that command?

Measure-Command {dir C:\} TotalMilliseconds : 2.9708 Measure-Command {Get-ChildItem "C:\"} TotalMilliseconds : 2.4161

I feel like I should point out that `Measure-Command {dir C:\}` is just aliasing gci.

    PS> Measure-Command {Start-Process cmd -ArgumentList '/c dir c:\'}
    TotalMilliseconds : 14.0138

    PS> Measure-Command {gci C:\}
    TotalMilliseconds : 10.7484
Second run on each of those went down to closer to 40% of each, yay caching.

Of course, the start-process is possibly taking up a chunk of time, there. With no measure-command for cmd, it makes it a little harder to gauge.

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

#190
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 have been waiting for that for years - now if they would only add TABS to real powershell (as opposed to powershell ISE) or if they can add colors to powershell ISE I will be super-duper-bonus happy.
Post reply on HN