#How to register-argumentcompleter for functions that don't have explicit parameter?
7 messages · Page 1 of 1 (latest)
The -Native parameter.
unfortunately it does not, it seems only recognize application command type
?
Register-ArgumentCompleter -CommandName foo -Native -ScriptBlock {
param ( $wordToComplete, $commandAst, $cursorPosition )
<# logic here #>
}
otherwise please share what you attempted
I'd expect to have a bad time with this fwiw. Functions have far better support for completion if you write a param block (or use dynamicparam)