mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
TerminalShell: detect first shell we found only.
Previously we always detect login shell as current shell, which seems duplicate with userShell
This commit is contained in:
@@ -138,8 +138,11 @@ static void getTerminalShell(FFTerminalShellResult* result, pid_t pid)
|
||||
strcasecmp(name, "nu") == 0 ||
|
||||
strcasecmp(name, "git-shell") == 0
|
||||
) {
|
||||
ffStrbufSetS(&result->shellProcessName, name); // prevent from `fishbash`
|
||||
getProcessInformation(pid, &result->shellProcessName, &result->shellExe, &result->shellExeName);
|
||||
if (result->shellProcessName.length == 0)
|
||||
{
|
||||
ffStrbufSetS(&result->shellProcessName, name);
|
||||
getProcessInformation(pid, &result->shellProcessName, &result->shellExe, &result->shellExeName);
|
||||
}
|
||||
|
||||
getTerminalShell(result, ppid);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user