mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 05:04:17 +01:00
initial work
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
#include "fastfetch.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void ffPrintShell(FFstate* state)
|
||||
{
|
||||
char* shellPath = getenv("SHELL");
|
||||
char* shellName = strrchr(shellPath, '/');
|
||||
|
||||
if(shellName == NULL)
|
||||
shellName = shellPath;
|
||||
else if(shellName[0] == '/')
|
||||
++shellName;
|
||||
|
||||
ffPrintLogoAndKey(state, "Shell");
|
||||
printf("%s\n", shellName);
|
||||
}
|
||||
Reference in New Issue
Block a user