Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43b2917

Browse files
authored
Add more terminals with color support (#1621)
1 parent 408f9e0 commit 43b2917

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

src/colorprint.cc

+17-5
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,24 @@ bool IsColorTerminal() {
163163
#else
164164
// On non-Windows platforms, we rely on the TERM variable. This list of
165165
// supported TERM values is copied from Google Test:
166-
// <https://github.com/google/googletest/blob/main/googletest/src/gtest.cc#L2925>.
166+
// <https://github.com/google/googletest/blob/v1.13.0/googletest/src/gtest.cc#L3225-L3259>.
167167
const char* const SUPPORTED_TERM_VALUES[] = {
168-
"xterm", "xterm-color", "xterm-256color",
169-
"screen", "screen-256color", "tmux",
170-
"tmux-256color", "rxvt-unicode", "rxvt-unicode-256color",
171-
"linux", "cygwin",
168+
"xterm",
169+
"xterm-color",
170+
"xterm-256color",
171+
"screen",
172+
"screen-256color",
173+
"tmux",
174+
"tmux-256color",
175+
"rxvt-unicode",
176+
"rxvt-unicode-256color",
177+
"linux",
178+
"cygwin",
179+
"xterm-kitty",
180+
"alacritty",
181+
"foot",
182+
"foot-extra",
183+
"wezterm",
172184
};
173185

174186
const char* const term = getenv("TERM");

0 commit comments

Comments
 (0)