mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 00:37:23 +01:00
TerminalShell: add support for Windows
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
#include "common/properties.h"
|
||||
#include "common/printing.h"
|
||||
#include "common/caching.h"
|
||||
#include "common/processing.h"
|
||||
#include "common/parsing.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/printing.h"
|
||||
#include "detection/terminalshell.h"
|
||||
#include "detection/terminalshell/terminalshell.h"
|
||||
|
||||
#define FF_SHELL_MODULE_NAME "Shell"
|
||||
#define FF_SHELL_NUM_FORMAT_ARGS 7
|
||||
@@ -18,7 +18,7 @@ void ffPrintShell(FFinstance* instance)
|
||||
if(instance->config.shell.outputFormat.length == 0)
|
||||
{
|
||||
ffPrintLogoAndKey(instance, FF_SHELL_MODULE_NAME, 0, &instance->config.shell.key);
|
||||
fputs(result->shellExeName, stdout);
|
||||
ffStrbufWriteTo(&result->shellProcessName, stdout);
|
||||
|
||||
if(result->shellVersion.length > 0)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/printing.h"
|
||||
#include "detection/terminalshell.h"
|
||||
#include "detection/terminalshell/terminalshell.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -20,11 +20,7 @@ void ffPrintTerminal(FFinstance* instance)
|
||||
if(instance->config.terminal.outputFormat.length == 0)
|
||||
{
|
||||
ffPrintLogoAndKey(instance, FF_TERMINAL_MODULE_NAME, 0, &instance->config.terminal.key);
|
||||
|
||||
if(strncmp(result->terminalExeName, result->terminalProcessName.chars, result->terminalProcessName.length) == 0) // if exeName starts with processName, print it. Otherwise print processName
|
||||
puts(result->terminalExeName);
|
||||
else
|
||||
ffStrbufPutTo(&result->terminalProcessName, stdout);
|
||||
ffStrbufPutTo(&result->terminalProcessName, stdout);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user