Summary of the new feature/enhancement
I make use of Format-List -View, Format-Table -View etc a lot, and always try to provide multiple views for objects in the packages I maintain. However, these views are not discoverable - there is no autocompletion, and providing an unambiguous prefix also doesn't work, you have to remember and type out the whole view name.
If the output type of the previous pipeline step is known (i.e. because the cmdlet has [OutputType()] declared, it's a variable, or a ForEach-Object etc), PowerShell should look up what views of that type (list/table/custom) are available and autocomplete them. E.g. Format-List -View v should autocomplete to Format-List -View Verbose if such a view is defined.
Summary of the new feature/enhancement
I make use of
Format-List -View,Format-Table -Viewetc a lot, and always try to provide multiple views for objects in the packages I maintain. However, these views are not discoverable - there is no autocompletion, and providing an unambiguous prefix also doesn't work, you have to remember and type out the whole view name.If the output type of the previous pipeline step is known (i.e. because the cmdlet has
[OutputType()]declared, it's a variable, or aForEach-Objectetc), PowerShell should look up what views of that type (list/table/custom) are available and autocomplete them. E.g.Format-List -View vshould autocomplete toFormat-List -View Verboseif such a view is defined.