Non-cygwin subprocesses are not handling the ANSI escape sequence #9203

Open
opened 2026-01-31 01:48:39 +00:00 by claunia · 0 comments
Owner

Originally created by @trajano on GitHub (Jun 22, 2020).

This is a follow up to https://github.com/microsoft/terminal/issues/2837 which is already resolved in that the a large set of ANSI is already handled by Windows Terminal. This seems to propagate properly through any other tools that use the cygwin/msys libraries such as ls

However, it does not appear to handle ANSI escape sequences for processes that do not use Cygwin/MSys in those scenarios the raw escape codes appear.

I am thinking this is likely an External bug, but I wanted to double check since I saw one of the Terminal devs using something called "Libra" to find the process flow to debug something like this. It could likely be something about setting an envvar or something to trigger a proper call.

Environment

Microsoft Windows [Version 10.0.19041.329]

Windows Terminal version (if applicable):
Version: 1.0.1401.0

Any other software?
git version 2.27.0.windows.1

Steps to reproduce

  1. Set up Git Bash as your shell https://stackoverflow.com/questions/56839307/adding-git-bash-to-the-new-windows-terminal/57369284#57369284
  2. Have a Gradle project or some other program that would spit out ANSI escape sequences that does not use MSys/Cygwin.
  3. Run ./gradlew build

Expected behavior

ANSI escape sequences are parsed and handled like this in the Git Bash shortcut provided by Git for Windows

image

Actual behavior

ANSI escape sequences are visible and not handled in Windows Terminal's shell
image

Originally created by @trajano on GitHub (Jun 22, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> This is a follow up to https://github.com/microsoft/terminal/issues/2837 which is already resolved in that the a large set of ANSI is already handled by Windows Terminal. This seems to propagate properly through any other tools that use the cygwin/msys libraries such as `ls` However, it does not appear to handle ANSI escape sequences for processes that do not use Cygwin/MSys in those scenarios the raw escape codes appear. I am thinking this is likely an External bug, but I wanted to double check since I saw one of the Terminal devs using something called "Libra" to find the process flow to debug something like this. It could likely be something about setting an envvar or something to trigger a proper call. # Environment ```none Microsoft Windows [Version 10.0.19041.329] Windows Terminal version (if applicable): Version: 1.0.1401.0 Any other software? git version 2.27.0.windows.1 ``` # Steps to reproduce 1. Set up Git Bash as your shell https://stackoverflow.com/questions/56839307/adding-git-bash-to-the-new-windows-terminal/57369284#57369284 2. Have a Gradle project or some other program that would spit out ANSI escape sequences that does not use MSys/Cygwin. 3. Run `./gradlew build` # Expected behavior ANSI escape sequences are parsed and handled like this in the Git Bash shortcut provided by Git for Windows ![image](https://user-images.githubusercontent.com/110627/85312204-7d5ab200-b484-11ea-89fb-7192b7f2565f.png) # Actual behavior <!-- What's actually happening? --> ANSI escape sequences are visible and not handled in Windows Terminal's shell ![image](https://user-images.githubusercontent.com/110627/85312274-a0856180-b484-11ea-839b-86a33a9b772c.png)
claunia added the Resolution-ExternalNeeds-Tag-Fix labels 2026-01-31 01:48:39 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9203