mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Shell: makes fish shell version detection more robust
This commit is contained in:
@@ -87,7 +87,7 @@ static bool getShellVersionFish(FFstrbuf* exe, FFstrbuf* version)
|
||||
return false;
|
||||
|
||||
//fish, version 4.0.2-1 (Built by MSYS2 project) // version can be localized if LC_ALL is set
|
||||
if (version->length < strlen("fish, v")) return false;
|
||||
if (!ffStrbufStartsWithS(version, "fish, ")) return false;
|
||||
uint32_t index = ffStrbufNextIndexC(version, strlen("fish, "), ' ');
|
||||
ffStrbufSubstrAfter(version, index);
|
||||
ffStrbufSubstrBeforeFirstC(version, ' ');
|
||||
|
||||
Reference in New Issue
Block a user