Skip to content

Commit

Permalink
TerminalShell (Linux): improve performance of foot version detection
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Sep 20, 2024
1 parent db669c0 commit 1dba6d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/detection/terminalshell/terminalshell.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,13 @@ FF_MAYBE_UNUSED static bool getTerminalVersionKonsole(FFstrbuf* exe, FFstrbuf* v

FF_MAYBE_UNUSED static bool getTerminalVersionFoot(FFstrbuf* exe, FFstrbuf* version)
{
uint32_t major = 0, minor = 0, patch = 0;
if (ffGetTerminalResponse("\e[>c", 3, "\e[>1;%2u%2u%2u;0c", &major, &minor, &patch) == NULL)
{
ffStrbufSetF(version, "%u.%u.%u", major, minor, patch);
return true;
}

if(!getExeVersionRaw(exe, version)) return false;

//foot version: 1.13.1 -pgo +ime -graphemes -assertions
Expand Down

0 comments on commit 1dba6d1

Please sign in to comment.