Skip to content

Commit 11827d6

Browse files
committed
TerminalShell: fix compiling on macOS
1 parent 47ac01c commit 11827d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/detection/terminalshell/terminalshell_linux.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,12 @@ const FFTerminalShellResult* ffDetectTerminalShell(const FFinstance* instance)
378378
ffStrbufInitS(&result.shellPrettyName, result.shellExeName);
379379
}
380380

381+
if(ffStrbufEqualS(&result.terminalProcessName, "wezterm-gui"))
382+
ffStrbufInitS(&result.terminalPrettyName, "WezTerm");
383+
381384
#if defined(__linux__) || defined(__FreeBSD__)
382385

383-
if(ffStrbufStartsWithS(&result.terminalProcessName, "gnome-terminal-"))
386+
else if(ffStrbufStartsWithS(&result.terminalProcessName, "gnome-terminal-"))
384387
ffStrbufInitS(&result.terminalPrettyName, "gnome-terminal");
385388

386389
#elif defined(__APPLE__)
@@ -394,8 +397,6 @@ const FFTerminalShellResult* ffDetectTerminalShell(const FFinstance* instance)
394397

395398
#endif
396399

397-
else if(ffStrbufEqualS(&result.terminalProcessName, "wezterm-gui"))
398-
ffStrbufInitS(&result.terminalPrettyName, "WezTerm");
399400
else if(strncmp(result.terminalExeName, result.terminalProcessName.chars, result.terminalProcessName.length) == 0) // if exeName starts with processName, print it. Otherwise print processName
400401
ffStrbufInitS(&result.terminalPrettyName, result.terminalExeName);
401402
else

0 commit comments

Comments
 (0)