-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Description
Description of the new feature/enhancement
From https://www.gnu.org/software/gettext/manual/html_node/The-TERM-variable.html:
The environment variable TERM contains a identifier for the text window’s capabilities. You can get a detailed list of these capabilities by using the
infocmpcommand, usingman 5 terminfoas a reference.
Defining this environment variable on Windows will allow all terminal emulators on Windows to set this based on their capabilities as reported by terminfo. It will need to be established in a way that would allow multiple terminal emulators to set their own value within the variable (similar to how the PATH variable works). By default, conhost will report its terminfo features. When Windows Terminal eventually is shipped by default on Windows, it's terminfo will also be reported by default as well. Furthermore the command specified by GNU infocmp should be available to all terminals include the default conhost and Windows Terminal to list the terminal capabilities.
The biggest gain from this will be from the use of scripts/utilities/applications that require knowledge of the terminal capabilities that already use this environment variable on other systems (Linux, MacOS, etc.).
Proposed technical implementation details (optional)
We now have a Powershell script that determines the VT support #1884. Perhaps it could be adapted to also report the terminfo capabilities set by the TERM env variable in Windows for conhost and Windows Terminal.
Also very related but not quite the same based on what I saw from the discussion: #1040.