cobra icon indicating copy to clipboard operation
cobra copied to clipboard

Make Powershell completion work in constrained mode

Open lstemplinger opened this issue 4 months ago • 5 comments

Currently the Powershell completion script generated by Cobra does not work in constrained mode because creating CompletionResult Objects is blocked there.

This adds a check to the script that returns results as plain strings if constrained mode is enabled. Results in FullLanguage mode are unchanged.

So far I've tested with Powershell 5.1 on Windows 10, all three completion modes seem to work as expected even in constrained mode.

lstemplinger avatar Oct 09 '24 15:10 lstemplinger