You can define auto-completion results for parameter values in a variety of different ways such as using dynamic parameters, the CompletionResult class within a parameter's ArgumentCompleter attribute declaration, the ValidateSet attribute, etc.
If tab-completion results aren't declared, then PowerShell (by default) will return a contextual list of provider objects/items for parameter value auto-completion suggestions (whether "autocompleted" with Tab
or CTRL+SPACE
).
For example, pressing CTRL+SPACE
after Test -ParamName
shows a list of filesystem objects.
I know that CTRL+SPACE
is PSReadLine's MenuComplete function at work, but even if PSReadLine is removed, the default behavior of returning contextual provider objects still persists when using Tab
to autocomplete parameter values.
Is this default behavior/preference (of returning provider objects) exposed anywhere like an automatic variable, .NET class property/field, .ps1xml file, etc?