Skip to content

Bring your own ReadLine #1722

Open
Open
@dkattan

Description

@dkattan

The Problem

I am unable to create a web based script editor with a terminal because both PSReadline and LegacyReadLine ultimately call Console.GetKey and Console.Write, causing the input and output to be mapped to the calling process’s Console.

Suggested Fix

Add a -UseUnderlyingHostReadline switch and change the following code:

**

public override string ReadLine() => _readLineProvider.ReadLine.ReadLine(CancellationToken.None);
**

To call _underlyingHostUI.ReadLine() if -UseUnderlyingHostReadline is specified

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