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
?