Closed ghost closed 6 years ago
Let me think a little bit. I have tried some straightforward conversion and it did not work (not sure why..).
We can transform the final ${*}.result
before returning it:
for($i = 0; $i -lt ${*}.result.CompletionMatches.Count; ++$i) {
$r = ${*}.result.CompletionMatches[$i]
${*}.result.CompletionMatches[$i] = New-Object System.Management.Automation.CompletionResult @(
$r.CompletionText.ToLower()
$r.ListItemText
$r.ResultType
$r.ToolTip
)
}
${*}.result
There are two places where we return it (actually 3, but one is special read-only). You may create a function doing this conversion and call it.
@nightroman Wow, thanks a lot!
How can I modify TabExpansion2 to complete in lowercase.
Thanks!