From 22012556f8dda188e0d223058cff2130fde033e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 27 Feb 2024 23:11:38 +0800 Subject: [PATCH] Terminal (Linux): support warp version detection --- src/detection/terminalshell/terminalshell.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/detection/terminalshell/terminalshell.c b/src/detection/terminalshell/terminalshell.c index bd21025b2..9d645356a 100644 --- a/src/detection/terminalshell/terminalshell.c +++ b/src/detection/terminalshell/terminalshell.c @@ -562,7 +562,13 @@ bool fftsGetTerminalVersion(FFstrbuf* processName, FF_MAYBE_UNUSED FFstrbuf* exe { if(ffStrbufStartsWithIgnCaseS(processName, termProgram) || // processName ends with `.exe` on Windows (ffStrEquals(termProgram, "vscode") && ffStrbufStartsWithIgnCaseS(processName, "code")) || - (ffStrEquals(termProgram, "iTerm.app") && ffStrbufStartsWithIgnCaseS(processName, "iTermServer-")) + + #ifdef __APPLE__ + (ffStrEquals(termProgram, "iTerm.app") && ffStrbufStartsWithIgnCaseS(processName, "iTermServer-")) || + #elif defined(__linux__) + (ffStrEquals(termProgram, "WarpTerminal") && ffStrbufEqualS(processName, "warp")) || + #endif + false ) { ffStrbufSetS(version, termProgramVersion); return true;