Skip to content

Type inference should have a special case for Get-Random #18889

@MartinGC94

Description

@MartinGC94

Summary of the new feature / enhancement

Get-Random can be used on collections like this: $RandomFiles = Get-ChildItem $PSHOME -File | Get-Random -Count 5 the type inference should handle this the same way it does with Select-Object -First X so tab completion can work like you would expect, eg: Get-ChildItem $PSHOME -File | Get-Random -Count 5 | where {$_.<tab>

Proposed technical implementation details (optional)

No response

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