Skip to content

Support GNU environment variable TERM in Windows #8336

@WSLUser

Description

@WSLUser

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 infocmp command, using man 5 terminfo as 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-VTVirtual Terminal sequence supportIssue-QuestionFor questions or discussionResolution-AnsweredRelated to questions that have been answeredResolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions