Skip to content

Format-* -View parameter should have autocompletion #9733

@felixfbecker

Description

@felixfbecker

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions