Skip to content

Commit

Permalink
Detect true-color support for Kitty terminal (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
AprilArcus authored Dec 7, 2022
1 parent 848b80e commit 67ce35e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
return 3;
}

if (env.TERM === 'xterm-kitty') {
return 3;
}

if ('TERM_PROGRAM' in env) {
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);

Expand Down

0 comments on commit 67ce35e

Please sign in to comment.