Make WezTerm terminal use true color

This commit is contained in:
Sindre Sorhus 2025-08-17 14:25:09 +07:00
parent 67db246ae0
commit a8f5bf7a67

View file

@ -139,6 +139,10 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
return 3; return 3;
} }
if (env.TERM === 'wezterm') {
return 3;
}
if ('TERM_PROGRAM' in env) { if ('TERM_PROGRAM' in env) {
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);