Skip to content

Commit

Permalink
fix(Terminal): make fastfetch works under ltrace and perf
Browse files Browse the repository at this point in the history
Fastfetch incorrectly displays the terminal name as
"ltrace" or "perf" when debugging itself with ltrace and perf.

minor fix: remove duplicated ffStrbufClear since getShellVersion
already called it.
  • Loading branch information
apocelipes committed Nov 28, 2023
1 parent 968a43c commit 47e92b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/detection/terminalshell/terminalshell_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ static void getTerminalShell(FFTerminalShellResult* result, pid_t pid)
strcasecmp(name, "gdb") == 0 ||
strcasecmp(name, "lldb") == 0 ||
strcasecmp(name, "login") == 0 ||
strcasecmp(name, "ltrace") == 0 ||
strcasecmp(name, "perf") == 0 ||
strcasecmp(name, "guake-wrapped") == 0 ||
strcasestr(name, "debug") != NULL ||
strcasestr(name, "command-not-found") != NULL ||
Expand Down Expand Up @@ -348,7 +350,6 @@ const FFTerminalShellResult* ffDetectTerminalShell()
getTerminalFromEnv(&result);
getUserShellFromEnv(&result);

ffStrbufClear(&result.shellVersion);
getShellVersion(&result.shellExe, result.shellExeName, &result.shellVersion);

if(ffStrbufEqualS(&result.shellProcessName, "pwsh"))
Expand Down

0 comments on commit 47e92b5

Please sign in to comment.