Live data from Hacker News

Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build

news.softpedia.com

171–180 of 350 posts

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

#171

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.

They should have implemented these with a missing command handler. So if the ls wget etc exist they work. But just before the command line complains of unknown program name it should check that list and execute the alias.

A new "bottom of the stack" alias instead of the current one that takes precedent over executables.

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

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

Huh. Apparently yes. I think I'm in love with you now. Carry on.

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

#173
post #73
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.

And you can use Ctrl+C Ctrl+V :) If you upgraded from a previous Windows you need to disable legacy mode.

Thanks for this. I upgraded and was wondering why I couldn't Ctrl+C/V vs one that was a fresh install.

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

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

No, dir `c:\ works` just fine.

It is a short version for

    Get-ChildItem -Directory C:/

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

#176

That's nice. Can you pipe binary data without powershell corrupting it, or is that now a feature? https://brianreiter.org/2010/01/29/powershells-object-pipeli...

Related, running something like decrypt hugefile.dat | encode outfile.dat will usually result in powershell using up all your system ram and crashing.

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

#177
post #30

Earlier quoted context omitted.

At least Powershell has Unixy aliases for the common commands. I don't know how many times I've been in a cmd shell and typed ls and then swore at things.

I just wrote batch files that serve as aliases for those. I type ls in my command shell and it does a dir /w behind the scenes, which makes it look more like how it looks in Linux anyway. Here are the ones I have: * cat.bat: type %1 * clear.bat: cls * diff.bat: fc /n /w %1 %2 * ls.bat: dir /w %1% * pwd.bat: cd * touch.bat: echo . >> %1 * top.bat: tasklist All have an @echo off at the top too. Touch is a little janky,…

You could put the @ in front of the command like so:

1 line file: @type %1

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

#178

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.

Windows has an execute permission, it's just rare for a file's permissions to be set granularly.

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

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

Dude. I have worked with UNIX like systems most of my prof. career. I have migrated to the "dark'side just recently (3 y ago). They are both just tools to get the job done.

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

#180
post #146
post #126

Earlier quoted context omitted.

If you type: dir - PowerShell will list all available parameters below, and allow you to tab through them. The tab completion is not static either. If you type: ps , it will tab through all the current processes.

I you type "Start-VM -name ", it won't list the list of the VMs, but rather the list of the files in the current directory. That's not exactly what I would call insightful. I didn't know about the CTR+SPACE. That being said it doesn't seem much more insightful than TAB. And no description of what the argument does.

The issue with "Start-VM -name " is not an issue with Powershell itself, but with the Start-VM cmdlet; the Start-VM cmdlet could have been designed to complete from the list of VMs.
Post reply on HN