Skip to content

Commit f973572

Browse files
committed
TerminalShell (Linux): relax detection of terminals in NixOS
Fix #1479
1 parent ea78665 commit f973572

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/detection/terminalshell/terminalshell_linux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,11 +313,11 @@ static void setShellInfoDetails(FFShellResult* result)
313313

314314
static void setTerminalInfoDetails(FFTerminalResult* result)
315315
{
316-
if(ffStrbufStartsWithC(&result->processName, '.') && ffStrbufEndsWithS(&result->processName, "-wrapped"))
316+
if(ffStrbufStartsWithC(&result->processName, '.') && ffStrbufContainS(&result->processName, "-wrap"))
317317
{
318318
// For NixOS. Ref: #510 and https://github.com/NixOS/nixpkgs/pull/249428
319319
// We use processName when detecting version and font, overriding it for simplification
320-
ffStrbufSubstrBefore(&result->processName, result->processName.length - (uint32_t) strlen("-wrapped"));
320+
ffStrbufSubstrBeforeLastC(&result->processName, '-');
321321
ffStrbufSubstrAfter(&result->processName, 0);
322322
}
323323

0 commit comments

Comments
 (0)