Skip to content

add 'TimeOut' and 'DefaultValue' parameter to read-host #16660

@kasini3000

Description

@kasini3000

Summary of the new feature / enhancement

Pwsh has no timeout. Although there is timeout.exe on win, but not for read host.
At present, if you need cross platform application, you need to write your own code.

Details:
Increase parameter 'TimeOutSecond', value in seconds. default value is - 1.
Increase parameter 'DefaultValue' , default value is $null.

Proposed technical implementation details (optional)

eg:
$foo = read-host -TimeOut 10 -DefaultValue 'bar' -prompt 'input xxx'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.Resolution-No ActivityIssue has had no activity for 6 months or moreWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions