support for --shell-path

This commit is contained in:
Linus Dierheimer
2021-03-05 23:26:05 +01:00
parent 9122daa63a
commit bc13b51b5a
4 changed files with 33 additions and 8 deletions
+14 -6
View File
@@ -12,12 +12,20 @@ void ffPrintShell(FFinstance* instance)
return;
}
char* shellName = strrchr(shellPath, '/');
char* value;
if(shellName == NULL)
shellName = shellPath;
else if(shellName[0] == '/')
++shellName;
if(!instance->config.shellShowPath)
{
char* shellName = strrchr(shellPath, '/');
if(shellName != NULL)
value = ++shellName;
else
value = shellPath;
}
else
{
value = shellPath;
}
ffPrintAndSaveCachedValue(instance, "Shell", shellName);
ffPrintAndSaveCachedValue(instance, "Shell", value);
}