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

Fixed ^A/^B and added support for Windows ConPty. #2209

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

SilverPhoenix99
Copy link
Contributor

@SilverPhoenix99 SilverPhoenix99 commented Jul 3, 2021

Fixed issue with printing control characters \001/^A and \002/^B.

Added Pry.config.escape_prompt to manage adding those control characters to the prompt (the default is true).
It can then be disabled for terminals that don't have readline, or where readline's version doesn't support those characters.

Added support for ConPty in Windows, which supports Ansi escapes natively.

Fixed all unit tests to run in Windows.

@SilverPhoenix99 SilverPhoenix99 changed the base branch from 2185-pager-bug-fix to master July 4, 2021 14:43
@SilverPhoenix99 SilverPhoenix99 marked this pull request as draft July 4, 2021 14:50
@SilverPhoenix99 SilverPhoenix99 changed the title Made \001/\002 escape sequences optional. Fixed ^A/^B and added support for Windows ConPty. Jul 4, 2021
@SilverPhoenix99 SilverPhoenix99 marked this pull request as ready for review July 4, 2021 15:17
Added `Pry.config.escape_prompt` to manage adding those control characters to the prompt (the default is `true`).
It can then be disabled for terminals that don't have readline, or where readline's version doesn't support those characters.
\
Added support for [ConPty](https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what it's worth, ConPTY is not the name we use for the version of the console that supports VT/control sequences.

ENABLE_VIRTUAL_TERMINAL_PROCESSING enables VT sequences on a fairly old version of Windows 10 -- something like "10.0.10240". That's the only thing you'll need to check. 😄

ConPTY is a newer API that lets somebody else display the UI for the console, instead of leaving us to do it. That's how somebody like alacritty or hyper can run pry! It is much newer (Windows 10 version 17763 or higher.)

Fortunately, you only need the first thing.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Happy to answer any questions about it! I'm the engineering lead for the console and Windows Terminal. 👋)

@OmriSama
Copy link

OmriSama commented Aug 3, 2021

@kyrylo @SilverPhoenix99 This has been open for a month now and it looks good... could we get it merged please? 😄

@bbugh
Copy link

bbugh commented Oct 20, 2021

Pretty please?

@judy
Copy link

judy commented Nov 19, 2021

Bumping for visibility, it's been another month and I'd like to see this get added.

@Ikariusrb
Copy link

Is there a blocker to getting this merged?

@andrehjr
Copy link
Member

@Ikariusrb I don't think so, it's on my list to properly review this. And to also configure Windows tests to Github Actions to ensure it keeps working.

@kyrylo any thoughts over here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants