Colors (Linux): support tmux in linux TTY

This commit is contained in:
李通洲
2024-08-20 15:10:56 +08:00
parent 811485661f
commit 8559ab2dcd
+2 -1
View File
@@ -57,7 +57,8 @@ void ffPrintColors(FFColorsOptions* options)
if (options->symbol == FF_COLORS_SYMBOL_BACKGROUND)
{
const char* term = getenv("TERM");
if (term && ffStrEquals(term, "linux"))
// Should be "linux", however some terminal mulitplexer overrides $TERM
if (term && !ffStrStartsWith(term, "xterm"))
ffStrbufAppendS(&result, "\e[5m");
}
#endif