A little bit of background.
1) Powershell default tabexpansion logic doesn't have function parameter
expansion. This is something that Mow added in Powertab, where he
manually parses a functions definition from its scriptblock.
2) in powershell.exe you'll see the tabexpansion function doesn't even
contain cmdlet logic..
this is because doing a get-command each time is expensive and unneeded
when the host already knows the cmdlets loaded.. so powershell.exe
internally deals with a few tab expansion scenarios, namely CMDLETs and
provider (file system/registry etc) expanision.. then offloads the rest
of the scenarios to the tabexpansion function.
Some versions of Powertab (not sure about hte current) also override the
build in cmdlet expansion (so that mow can provide his console based
selection "windows" ).
In powershell plus , we also manually deal with cmdlets and file
expansion, but also a number of other things such as $_, before passing
it off to tabexpansion..
Hal Rottenberg wrote:
> Someone help me confirm this posh bug? Create a function of the same
> name as a cmdlet, the function must have at least one parameter. See if
> you can tab complete on the function's params. Of course you should be
> able to because functions have higher execution priority than cmdlets,
> but it doesn't work that way for me.
> I thought it was a bug of PS+, they thought it might be a PowerTab bug,
> but now I think it might be powershell itself.