![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | help repro this possible posh bug? tab completion with cmdlet andfunction conflicts 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. -- Hal Rottenberg Blog: http://halr9000.com Webmaster, Psi (http://psi-im.org) Co-host, PowerScripting Podcast (http://powerscripting.net) |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: help repro this possible posh bug? tab completion with cmdlet andfunction conflicts PowerShell doesn't complete the parameter. When I enable PowerTAB, the parameter name appears is in the autocomplete list as if it belongs to the *original* cmdlet parameters. ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) | ||||||||||||||||||||||||
| Guest | Re: help repro this possible posh bug? tab completion with cmdlet andfunction conflicts Hal I checked it on another machine (v1), even if the function is not named after an exisiting cmdlet there is no tab completion for parameters. ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com
| ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
| | #4 (permalink) |
| Guest | [bug filed] tab completion with cmdlet and function conflicts Thanks for confirming, Shay. The connect bug report is: https://connect.microsoft.com/feedba...3468&SiteID=99 -- Hal Rottenberg Blog: http://halr9000.com Webmaster, Psi (http://psi-im.org) Co-host, PowerScripting Podcast (http://powerscripting.net) |
My System Specs![]() |
| | #5 (permalink) | ||||||||||||
| Guest | Re: help repro this possible posh bug? tab completion with cmdletand function conflicts 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.. -Karl Hal Rottenberg wrote:
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #6 (permalink) | ||||||||||||||||||||||||
| Guest | Re: help repro this possible posh bug? tab completion with cmdletand function conflicts Karl Prosser[MVP] wrote:
![]()
![]() -- Hal Rottenberg Blog: http://halr9000.com Webmaster, Psi (http://psi-im.org) Co-host, PowerScripting Podcast (http://powerscripting.net) | ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Invoking Cmdlet Get-Location from cmdlet,cant get Currnt Directory | Vikram | PowerShell | 2 | 06-05-2008 04:41 AM |
| Whether a cmdlet derives from cmdlet or pscmdlet | Marco Shaw | PowerShell | 1 | 09-19-2007 09:18 PM |
| Invoking a cmdlet from another cmdlet | Marco Shaw | PowerShell | 2 | 09-19-2007 12:46 PM |
| Conflicts?? | =?Utf-8?B?Q3JhenkgUmV2?= | Vista hardware & devices | 0 | 09-21-2006 02:56 PM |
| Invoke Cmdlet from a Cmdlet | =?Utf-8?B?ZnV6enkzMzM=?= | PowerShell | 3 | 08-25-2006 07:49 AM |