From 6bb748869ec3df28cb913e032d271eac2594946e Mon Sep 17 00:00:00 2001 From: Carter Li Date: Sun, 5 May 2024 13:35:39 +0800 Subject: [PATCH] Terminal (macOS): fix Apple Terminal detection Fix #878 --- src/detection/terminalshell/terminalshell_linux.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/detection/terminalshell/terminalshell_linux.c b/src/detection/terminalshell/terminalshell_linux.c index 58c551e20..b2ad822dd 100644 --- a/src/detection/terminalshell/terminalshell_linux.c +++ b/src/detection/terminalshell/terminalshell_linux.c @@ -519,6 +519,11 @@ static void setTerminalInfoDetails(FFTerminalResult* result) else if(ffStrbufEqualS(&result->processName, "iTerm.app") || ffStrbufStartsWithS(&result->processName, "iTermServer-")) ffStrbufInitStatic(&result->prettyName, "iTerm"); + else if(ffStrbufEndsWithS(&result->exePath, "Terminal.app/Contents/MacOS/Terminal")) + { + ffStrbufSetStatic(&result->processName, "Apple_Terminal"); // for terminal font detection + ffStrbufInitStatic(&result->prettyName, "Apple Terminal"); + } else if(ffStrbufEqualS(&result->processName, "Apple_Terminal")) ffStrbufInitStatic(&result->prettyName, "Apple Terminal"); else if(ffStrbufEqualS(&result->processName, "WarpTerminal"))