News for hackers. Stuff that matters.
Re:Microsoft Replaces Command Prompt with PowerShell in Late... by captainmuon on Friday November 18, 2016 @09:33AM (#12986985)
There is auto-complete support. I just tested it (not a powershell user myself), and it seems pretty intelligent.

For example, if you type

    dir | sort <TAB>
it suggests Attributes, BaseName, CreationTime, .... All properties of file objects (which is what dir returns).

Also there is PowerShell ISE, which is a IDE for powershell, but I haven't really tried it yet.

Re:Microsoft Replaces Command Prompt with PowerShell in Late... by cm2187 on Friday November 18, 2016 @09:59AM (#12987149)
That's not what I mean by autocomplete. What I mean is more like Visual Studio's intellisense, ie a drop down that lets you know what are all the options from there. You can type DIR <TAB>, that won't tell you that you can apply the parameters "/p" or "/w" nor what these parameters mean. ISE does a slightly better job but is based on a static specs, rather than the current state of the system. So it won't list the VM names currently active in the system for instance.

Yes you can type -?, but that's as bad as having to go on the web to read the documentation. It's disruptive. The point of a good auto-complete is to have a list at your fingertips with a short description of what it does, without interrupting your train of thought.

Re:Microsoft Replaces Command Prompt with PowerShell in Late... by NetStrikeForce on Friday November 18, 2016 @10:13AM (#12987250)
That's exactly how it works!

You can press ctrl+space and it pops out a list of options to choose from, then you move with the arrow keys. It works for parameters and values (if there's a set to choose from):

I've taken a screenshot to illustrate: http://i.imgur.com/d7MVYma.png

Re:Microsoft Replaces Command Prompt with PowerShell in Late... by Rynant on Friday November 18, 2016 @10:16AM (#12987277)
If you type: dir -<Ctrl+Space> 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 <Tab>, it will tab through all the current processes.

Re:Microsoft Replaces Command Prompt with PowerShell in Late... by cm2187 on Friday November 18, 2016 @10:38AM (#12987438)
I you type "Start-VM -name <TAB>", 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.

Re:Microsoft Replaces Command Prompt with PowerShell in Late... by Rynant on Friday November 18, 2016 @11:14AM (#12987746)
The issue with "Start-VM -name <TAB>" 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.
Re:Microsoft Replaces Command Prompt with PowerShell in Late... by Already__Taken on Friday November 18, 2016 @10:09AM (#12987224)
The ise can do that if you've got the object at the time you're writing like that, it can't run a command for you as your typing it.

You'll never get a drop down list in the host terminal windows has it doesn't have a GUI layer like that. Wrap it in a electron app and make one.

you can type `dir -<tab>` and cycle through the options. type `get-help dir` to see what they do or install posh-git and use `dir -<ctrl-space>` to get a menu of options to choose. I didn't know about -?

Re:Microsoft Replaces Command Prompt with PowerShell in Late... by jodrellblank on Friday November 18, 2016 @01:17PM (#12988817)
You'll never get a drop down list in the host terminal windows has it doesn't have a GUI layer like that.

Except you do, with PSReadline, built into Windows 10 PowerShell.

Re:Microsoft Replaces Command Prompt with PowerShell in Late... by Already__Taken on Saturday November 19, 2016 @04:28AM (#12992699)
Sorry yes that's psreadline not posh-git like I commented. I wouldnt' call that a drop down though, that's just adding to the output isn't it? You know I've no idea how that works, could come in handy actually I should learn.
Re:Microsoft Replaces Command Prompt with PowerShell in Late... by jodrellblank on Saturday November 19, 2016 @02:44PM (#12995220)
It's as close to a dropdown as you can get in the CLI without putting GUI elements over the top. Try

    gci -  then ctrl+space
The available parameters appear on the screen, you can select one with the arrow keys, and tab, when you choose one and press space, they all disappear again. It's interactive, dynamic, it changes depending on how much of the parameter name you've typed - it's not just printing to the screen and stuck there.