Display: add option --ts-version to hide terminal and shell version

This commit is contained in:
李通洲
2024-04-18 22:53:31 +08:00
parent 0e7dda4043
commit fd0b35f21a
5 changed files with 26 additions and 4 deletions
@@ -223,6 +223,8 @@ static bool getShellVersionGeneric(FFstrbuf* exe, const char* exeName, FFstrbuf*
bool fftsGetShellVersion(FFstrbuf* exe, const char* exeName, FFstrbuf* version)
{
if (!instance.config.display.tsVersion) return false;
if(strcasecmp(exeName, "bash") == 0 || strcasecmp(exeName, "sh") == 0)
return getShellVersionBash(exe, version);
if(strcasecmp(exeName, "zsh") == 0)
@@ -530,6 +532,8 @@ static bool getTerminalVersionConEmu(FFstrbuf* exe, FFstrbuf* version)
bool fftsGetTerminalVersion(FFstrbuf* processName, FF_MAYBE_UNUSED FFstrbuf* exe, FFstrbuf* version)
{
if (!instance.config.display.tsVersion) return false;
#ifdef __ANDROID__
if(ffStrbufEqualS(processName, "com.termux"))