mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
TerminalShell: improve xonsh version detection
This commit is contained in:
@@ -228,7 +228,7 @@ bool fftsGetShellVersion(FFstrbuf* exe, const char* exeName, FFstrbuf* version)
|
||||
return getExeVersionRaw(exe, version);
|
||||
if(strcasecmp(exeName, "ash") == 0)
|
||||
return getShellVersionAsh(exe, version);
|
||||
if(strcasecmp(exeName, "python") == 0 && getenv("XONSH_VERSION"))
|
||||
if((strcasecmp(exeName, "xonsh") == 0 || strcasecmp(exeName, "python") == 0) && getenv("XONSH_VERSION"))
|
||||
{
|
||||
ffStrbufSetS(version, getenv("XONSH_VERSION"));
|
||||
return true;
|
||||
|
||||
@@ -186,7 +186,8 @@ static pid_t getTerminalInfo(FFTerminalResult* result, pid_t pid)
|
||||
ffStrEquals(name, "git-shell") ||
|
||||
ffStrEquals(name, "elvish") ||
|
||||
ffStrEquals(name, "oil.ovm") ||
|
||||
(ffStrEquals(name, "python") && getenv("XONSH_VERSION"))
|
||||
ffStrEquals(name, "xonsh") ||
|
||||
ffStrEndsWith(name, ".sh")
|
||||
)
|
||||
{
|
||||
pid = ppid;
|
||||
|
||||
Reference in New Issue
Block a user