mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-05 04:34:19 +01:00
refactored internal state keeping
This commit is contained in:
+4
-4
@@ -2,15 +2,15 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void ffPrintShell(FFstate* state)
|
||||
void ffPrintShell(FFinstance* instance)
|
||||
{
|
||||
if(ffPrintCachedValue(state, "Shell"))
|
||||
if(ffPrintCachedValue(instance, "Shell"))
|
||||
return;
|
||||
|
||||
char* shellPath = getenv("SHELL");
|
||||
if(shellPath == NULL)
|
||||
{
|
||||
ffPrintError(state, "Shell", "getenv(\"SHELL\") == NULL");
|
||||
ffPrintError(instance, "Shell", "getenv(\"SHELL\") == NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@ void ffPrintShell(FFstate* state)
|
||||
else if(shellName[0] == '/')
|
||||
++shellName;
|
||||
|
||||
ffPrintAndSaveCachedValue(state, "Shell", shellName);
|
||||
ffPrintAndSaveCachedValue(instance, "Shell", shellName);
|
||||
}
|
||||
Reference in New Issue
Block a user