tabexpansion doesn't fall through if overridden
Posted
by guillermooo
on Stack Overflow
See other posts from Stack Overflow
or by guillermooo
Published on 2010-03-22T07:57:51Z
Indexed on
2010/03/22
8:01 UTC
Read the original article
Hit count: 344
powershell-v2.0
|autocomplete
The tabexpansion
function only works partially when I override it like so:
function tabexpansion {
param($line, $lastWord)
if ($line -eq "hey ") {
"you", "Joe"
}
}
The custom completions work as expected, but now I only get the default autocomplete behavior for cmdlet names, not parameters. So New-TAB works fine, but New-Alias -TAB doesn't. How do I get the regular completions too after overriding tabexpansion
?
© Stack Overflow or respective owner