#include "fastfetch.h" #include void ffPrintShell(FFstate* state) { char* shellPath = getenv("SHELL"); if(shellPath == NULL) { if(state->showErrors) ffPrintError(state, "Shell", "getenv(\"SHELL\") == NULL"); return; } char* shellName = strrchr(shellPath, '/'); if(shellName == NULL) shellName = shellPath; else if(shellName[0] == '/') ++shellName; ffPrintLogoAndKey(state, "Shell"); puts(shellName); }