Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring your own ReadLine #1722

Open
dkattan opened this issue Feb 21, 2022 · 1 comment
Open

Bring your own ReadLine #1722

dkattan opened this issue Feb 21, 2022 · 1 comment
Labels
Area-ReadLine Issue-Bug A bug to squash. Up for Grabs Will shepherd PRs.

Comments

@dkattan
Copy link
Contributor

dkattan commented Feb 21, 2022

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

@ghost ghost added the Needs: Triage Maintainer attention needed! label Feb 21, 2022
@StevenBucher98 StevenBucher98 added Area-ReadLine Issue-Bug A bug to squash. Up for Grabs Will shepherd PRs. and removed Needs: Triage Maintainer attention needed! labels Feb 28, 2022
@andyleejordan
Copy link
Member

Linking PR #1748

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-ReadLine Issue-Bug A bug to squash. Up for Grabs Will shepherd PRs.
Projects
None yet
Development

No branches or pull requests

3 participants