lzybkr / TabExpansionPlusPlus

A V3 PowerShell module to improve tab expansion and Intellisense
BSD 2-Clause "Simplified" License
196 stars 33 forks source link

TabExpansion++ should use OutputType filter command completion in a pipeline #10

Open lzybkr opened 11 years ago

lzybkr commented 11 years ago

Many built-in commands specify OutputType. Command completion could leverage this by only returning commands that take an object of type OutputType as a pipeline parameter. For example:

Get-Disk |

Here we could suggest only commands that accept a MSFT_Disk, e.g. these commands:

Get-Command -ParameterType MSFT_Disk

bielawb commented 11 years ago

I like this idea but I guess we would need to include all cmdlets that support binding ByPropertyName for any of their parameters too... Even if none of the properties match the parameter there is still scriptblock that user could pass to convert property to parameter: One I use from time to time (with some filters to it) is Get-Process | Get-ChildItem.