mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
fix(Terminal): make fastfetch works under ltrace and perf
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.
This commit is contained in:
@@ -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 ||
|
||||
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user