microsoft / microsoft/terminal

WT should set COLORTERM

Open
#11,057 50 comments 27 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-TerminalConnection Help Wanted In-PR Issue-Task Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

# Description of the new feature/enhancement

Related to #1040, WT should set the `COLORTERM` environment variable to "truecolor" since WT does support truecolor. I can understand how changing `TERM` to "xterm-truecolor" (from "xterm-256color") could be a breaking change, but that's what `COLORTERM` is for.

Some tools like with cli/cli#4079 use this to determine if 24-bit colors should be emitted. Easy enough for users to define - either as Windows environment variables or update their shell profile e.g., _.bashrc_, but users who don't know what won't enjoy a wash of color by default like with `gh issue list` starting with v2.0.0.

# Proposed technical implementation details (optional)

WT should ideally define the environment variable `COLORTERM=truecolor` within its own process environment block by default.

/cc @mislav

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating where Windows Terminal constructs the process environment block for child shells and commands. Confirm that setting COLORTERM=truecolor there is inherited by launched tools without changing TERM, then add or update coverage for the resulting environment behavior if the relevant tests are found.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.