Create wt -info-vt (or similar) to print list of supported VT sequences #18149

Closed
opened 2026-01-31 06:05:07 +00:00 by claunia · 4 comments
Owner

Originally created by @WSLUser on GitHub (Aug 10, 2022).

Description of the new feature/enhancement

Just like the terminfo file can be auto-generated, or the VT parser FSM, it is also possible to auto-generate the list of supported VT sequences along with some additional info. Expose the list of supported VT sequences via CLI.

Allow users and terminal applications to easily determine WT VT features without need of a terminfo.

Proposed technical implementation details (optional)

Contour has done this and has a pretty nice result. However Contour relies on using Crispy, a dependency it has. See https://github.com/contour-terminal/contour/pull/731

Originally created by @WSLUser on GitHub (Aug 10, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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! --> # Description of the new feature/enhancement Just like the terminfo file can be auto-generated, or the VT parser FSM, it is also possible to auto-generate the list of supported VT sequences along with some additional info. Expose the list of supported VT sequences via CLI. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> Allow users and terminal applications to easily determine WT VT features without need of a terminfo. # Proposed technical implementation details (optional) Contour has done this and has a pretty nice result. However Contour relies on using Crispy, a dependency it has. See https://github.com/contour-terminal/contour/pull/731 <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 06:05:08 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Aug 10, 2022):

This just sounds like creating another standard. What value does this provide over just a (well maintained) terminfo entry/?

Windows Terminal's got such a complicated VT support story (split across conhost/conpty/WT itself) that I just feel like this provides a minimal amount of value here for the complexity we'd have to deal with. We don't even the bandwidth to keep a terminfo entry maintained. Heck, even our own VT docs are pretty poorly maintained, despite us having a script that (at one point) would auto generate a table for us.

Not to mention, wt.exe is a WINDOWS process that wouldn't be able to print to the console it's called from. So the ergonomics here of printing that text to a win32 MessageBox (or similar) seems... bad.

I just don't see what extra value this gets us. Happy to be proven wrong though.

@zadjii-msft commented on GitHub (Aug 10, 2022): This just sounds like creating _another standard_. What value does this provide over just a (well maintained) `terminfo` entry/? Windows Terminal's got such a complicated VT support story (split across conhost/conpty/WT itself) that I just feel like this provides a minimal amount of value here for the complexity we'd have to deal with. We don't even the bandwidth to keep a `terminfo` entry maintained. Heck, even our own VT docs are pretty poorly maintained, despite us having a script that (at one point) would auto generate a table for us. Not to mention, `wt.exe` is a WINDOWS process that wouldn't be able to print to the console it's called from. So the ergonomics here of printing that text to a win32 `MessageBox` (or similar) seems... bad. I just don't see what extra value this gets us. Happy to be proven wrong though.
Author
Owner

@WSLUser commented on GitHub (Aug 10, 2022):

There are plenty of terminal applications that are using other heuristics other than terminfo to determine terminal features. You don't even have to look any further than tmux for proof. This isn't about another standard, this is just helping applications have an easier time knowing what they can support on a given terminal without doing some of the many hacky things they already are to support users. Also the idea here is to make it so we can keep that documentation updated as we do keep getting out of date in reporting available features. A big consensus I'm seeing among certain popular terminal applications is to not rely on terminfo at all and simply acquire the information on sequence support through other means. This would be one of those means. Notcurses for example does a ton of trickery to determine things for every terminal it knows about because terminfo isn't reliable enough to ensure features are reported. Maybe it should be but it isn't and many features just aren't getting reported there. So even if this does become a standard, it's a far better one than terminfo at this point in the game.

@WSLUser commented on GitHub (Aug 10, 2022): There are plenty of terminal applications that are using other heuristics other than terminfo to determine terminal features. You don't even have to look any further than tmux for proof. This isn't about another standard, this is just helping applications have an easier time knowing what they can support on a given terminal without doing some of the many hacky things they already are to support users. Also the idea here is to make it so we can keep that documentation updated as we do keep getting out of date in reporting available features. A big consensus I'm seeing among certain popular terminal applications is to not rely on terminfo at all and simply acquire the information on sequence support through other means. This would be one of those means. Notcurses for example does a ton of trickery to determine things for every terminal it knows about because terminfo isn't reliable enough to ensure features are reported. Maybe it should be but it isn't and many features just aren't getting reported there. So even if this does become a standard, it's a far better one than terminfo at this point in the game.
Author
Owner

@WSLUser commented on GitHub (Aug 10, 2022):

The challenges regarding wt.exe are concerning but I was hopeful we could re-use our existing arg parser as it exists today without needing to introduce another one that sounds like it would be supporting Linux mechanisms through WSL or a VM or something, which I don't think would be what we want here. It should be native to Windows itself. Contour provides an excellent example but Contour is also cross-platform. WT is not so we need to determine the best way to use what Windows has available (or make it available in conhost) to report this information in the terminal window.

@WSLUser commented on GitHub (Aug 10, 2022): The challenges regarding wt.exe are concerning but I was hopeful we could re-use our existing arg parser as it exists today without needing to introduce another one that sounds like it would be supporting Linux mechanisms through WSL or a VM or something, which I don't think would be what we want here. It should be native to Windows itself. Contour provides an excellent example but Contour is also cross-platform. WT is not so we need to determine the best way to use what Windows has available (or make it available in conhost) to report this information in the terminal window.
Author
Owner

@zadjii-msft commented on GitHub (Aug 10, 2022):

Frankly, I'd rather do something more standardized across multiple emulators, than just adding another ad-hoc solution to further muddle the problem space. I'm gonna convert this thread to a discussion, and we can continue planning there until a better consensus is achieved.

@zadjii-msft commented on GitHub (Aug 10, 2022): Frankly, I'd rather do something more standardized across multiple emulators, than just adding another ad-hoc solution to further muddle the problem space. I'm gonna convert this thread to a discussion, and we can continue planning there until a better consensus is achieved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18149