mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 10:52:08 +02:00
support for --shell-path
This commit is contained in:
+14
-6
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user