mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
TerminalShell: fix iTerm being detected as iTermServer-* sometimes
This commit is contained in:
parent
9c7b868227
commit
ccb227e694
@ -6,6 +6,7 @@ Features:
|
||||
Bugfixes:
|
||||
* Fix flatpak package count (#441)
|
||||
* Don't print white color blocks with `--pipe` (#450)
|
||||
* Fix iTerm being detected as iTermServer-* sometimes
|
||||
|
||||
Logo:
|
||||
* Update Windows 11 ASCII logo to look more visually consistent (#445)
|
||||
|
@ -86,7 +86,8 @@ static void detectWarpTerminal(const FFinstance* instance, FFTerminalFontResult*
|
||||
|
||||
void ffDetectTerminalFontPlatform(const FFinstance* instance, const FFTerminalShellResult* terminalShell, FFTerminalFontResult* terminalFont)
|
||||
{
|
||||
if(ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "iterm.app") == 0)
|
||||
if(ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "iterm.app") == 0 ||
|
||||
ffStrbufStartsWithIgnCaseS(&terminalShell->terminalProcessName, "iTermServer-"))
|
||||
detectIterm2(instance, terminalFont);
|
||||
else if(ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "Apple_Terminal") == 0)
|
||||
detectAppleTerminal(terminalFont);
|
||||
|
@ -291,7 +291,8 @@ bool fftsGetTerminalVersion(FFstrbuf* processName, FF_MAYBE_UNUSED FFstrbuf* exe
|
||||
if(termProgram)
|
||||
{
|
||||
if(ffStrbufStartsWithIgnCaseS(processName, termProgram) || // processName ends with `.exe` on Windows
|
||||
(strcmp(termProgram, "vscode") == 0 && ffStrbufStartsWithIgnCaseS(processName, "code"))
|
||||
(strcmp(termProgram, "vscode") == 0 && ffStrbufStartsWithIgnCaseS(processName, "code")) ||
|
||||
(strcmp(termProgram, "iTerm.app") == 0 && ffStrbufStartsWithIgnCaseS(processName, "iTermServer-"))
|
||||
) {
|
||||
ffStrbufSetS(version, termProgramVersion);
|
||||
return true;
|
||||
|
@ -378,7 +378,7 @@ const FFTerminalShellResult* ffDetectTerminalShell(const FFinstance* instance)
|
||||
ffStrbufInitS(&result.shellPrettyName, result.shellExeName);
|
||||
}
|
||||
|
||||
if(ffStrbufEqualS(&result.terminalProcessName, "iTerm.app"))
|
||||
if(ffStrbufEqualS(&result.terminalProcessName, "iTerm.app") || ffStrbufStartsWithS(&result.terminalProcessName, "iTermServer-"))
|
||||
ffStrbufInitS(&result.terminalPrettyName, "iTerm");
|
||||
else if(ffStrbufEqualS(&result.terminalProcessName, "Apple_Terminal"))
|
||||
ffStrbufInitS(&result.terminalPrettyName, "Apple Terminal");
|
||||
|
Loading…
x
Reference in New Issue
Block a user