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

Win32 curl.exe should enable VT processing #216

Closed
PhMajerus opened this issue Jul 4, 2018 · 7 comments
Closed

Win32 curl.exe should enable VT processing #216

PhMajerus opened this issue Jul 4, 2018 · 7 comments
Assignees
Labels
Area-VT Virtual Terminal sequence support Issue-Question For questions or discussion Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered
Milestone

Comments

@PhMajerus
Copy link

PhMajerus commented Jul 4, 2018

I believe curl.exe is owned by PowerShell team, but since the issue is conhost-related, and you guys are probably the ones who can best understand what the issue is, and know how to fix it quickly, I'll report this here hoping you can get it done.

curl for Windows 10 (%SystemRoot%\System32\curl.exe) works pretty well, but inherits the conhost mode of the parent process.
Because of this, VT markup served over http for console users renders the escape characters instead of processing them as control sequences.

For behavior parity with the original version, can someone please add a SetConsoleMode ENABLE_VIRTUAL_TERMINAL_PROCESSING to curl.exe ?

curl wsl
curl win32

@zadjii-msft
Copy link
Member

Actually, I think that technically the WSL team owns the curl.exe we ship inbox now...

Regardless, we've had discussion before about going and updating curl with changes to enable VT processing for windows. @bitcrazed who should be on top of following up with them. IIRC someone needs to make a PR to the master curl repo (I don't believe we're maintaining a separate fork), and we'll take a binary drop from that, but I don't really remember the details.

Also see #51

@zadjii-msft zadjii-msft added discussion Resolution-External For issues that are outside this codebase labels Jul 5, 2018
@bitcrazed
Copy link
Contributor

I actually have a change-set to enable VT mode in Curl and will be working with the team to incorporate it if they're willing to accept my PR.

Hopefully, this will remedy this problem.

@bitcrazed
Copy link
Contributor

Update: The core of the changes is working nicely. A few more changes required to make curl handle codepages better on Windows, but we're making progress:

image

@DHowett-MSFT
Copy link
Contributor

This was curl/curl#3011, which is now merged. Thanks!

@bitcrazed bitcrazed reopened this Oct 4, 2019
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Oct 4, 2019
@bitcrazed
Copy link
Contributor

Reopening since we haven't yet pulled & rebuilt curl from recent sources.

Also started thread with team to consider taking this on.

@bitcrazed bitcrazed added Area-VT Virtual Terminal sequence support Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal. Issue-Bug It either shouldn't be doing this or needs an investigation. labels Oct 4, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 4, 2019
@bitcrazed bitcrazed added this to the 20H1 milestone Oct 4, 2019
@DHowett-MSFT DHowett-MSFT modified the milestones: 20H1, 21H1 Oct 24, 2019
@DHowett-MSFT
Copy link
Contributor

Looks like it does this now.

@DHowett-MSFT DHowett-MSFT added Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered and removed Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-External For issues that are outside this codebase labels Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-VT Virtual Terminal sequence support Issue-Question For questions or discussion Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

5 participants
@bitcrazed @DHowett-MSFT @zadjii-msft @PhMajerus and others