From 533231825c0e28062bfcdd4b24b90fdb27f809d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 24 Oct 2023 10:14:08 +0800 Subject: [PATCH] Terminal (Linux): detect `tmux: server` as tmux --- src/detection/terminalshell/terminalshell_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/detection/terminalshell/terminalshell_linux.c b/src/detection/terminalshell/terminalshell_linux.c index 810fe90bc..7b72f8618 100644 --- a/src/detection/terminalshell/terminalshell_linux.c +++ b/src/detection/terminalshell/terminalshell_linux.c @@ -236,8 +236,7 @@ static void getTerminalFromEnv(FFTerminalShellResult* result) //Termux if(!ffStrSet(term) && ( getenv("TERMUX_VERSION") != NULL || - getenv("TERMUX_MAIN_PACKAGE_FORMAT") != NULL || - getenv("TMUX_TMPDIR") != NULL + getenv("TERMUX_MAIN_PACKAGE_FORMAT") != NULL )) term = "com.termux"; #endif @@ -373,9 +372,10 @@ const FFTerminalShellResult* ffDetectTerminalShell() result.terminalExeName + 1); } - if(ffStrbufEqualS(&result.terminalProcessName, "wezterm-gui")) ffStrbufInitStatic(&result.terminalPrettyName, "WezTerm"); + if(ffStrbufStartsWithS(&result.terminalProcessName, "tmux:")) + ffStrbufInitStatic(&result.terminalPrettyName, "tmux"); #if defined(__ANDROID__)