tag v0.7.23a
Tagger: Alexeev Bronislav <bro.alexeev@inbox.ru>
Date:   Tue Sep 3 20:05:09 2024 +0700

version 0.7.23alpha

commit e6d98de4d581c657cefb5773b688313aa9a8ff2e
Author: Alexeev Bronislav <bro.alexeev@inbox.ru>
Date:   Mon Sep 2 22:44:00 2024 +0700

    fix: some changes and fix bugs

diff --git a/include/executor.h b/include/executor.h
index aa55535..af21a3e 100644
--- a/include/executor.h
+++ b/include/executor.h
@@ -2,7 +2,7 @@
 #define EXECUTOR_H
 
 int help(char** args);
-int quit(void);
+int quit_from_shell(void);
 int print_history(void);
 int reload_shell(void);
 int execute(char** args);
diff --git a/src/execution/executor.c b/src/execution/executor.c
index e2a1c20..07bfe58 100644
--- a/src/execution/executor.c
+++ b/src/execution/executor.c
@@ -75,7 +75,7 @@ int help(char** args) {
  *
  * @return     int Status code
  */
-int quit(void) {
+int quit_from_shell(void) {
 	bg_task* bt;
 
 	signal(SIGCHLD, SIG_IGN);
@@ -141,14 +141,15 @@ int execute_alias(char **args) {
  * @return     int Status code
  */
 int execute(char** args) {
-	if (args[0] == NULL) {
+	if (args[0] == NULL)
 		return 1;
-	} else if (strcmp(args[0], "cd") == 0) {
+
+	if (strcmp(args[0], "cd") == 0) {
 		return change_directory(args);
 	} else if (strcmp(args[0], "help") == 0) {
 		return help(args);
 	} else if (strcmp(args[0], "quit") == 0 || strcmp(args[0], "exit") == 0) {
-		return quit();
+		return quit_from_shell(); 
 	} else if (strcmp(args[0], "bg") == 0) {
 		return bg_tasks();
 	} else if (strcmp(args[0], "term") == 0) {
diff --git a/src/execution/tasks_processing.c b/src/execution/tasks_processing.c
index 8196aa3..37e31a3 100644
--- a/src/execution/tasks_processing.c
+++ b/src/execution/tasks_processing.c
@@ -14,11 +14,11 @@
 #include <signal.h>
 #include <errno.h>
 #include "colors.h"
+#include "executor.h"
 #include "fuzzy.h"
 
 // Functions definitions
 int kill(pid_t pid, int);
-int quit();
 
 const char *apps[] = {
 	"print", "shegang_config", "exit", 
@@ -289,7 +289,7 @@ int launch_task(char** args) {
 	} else {
 		if (background == 1) {
 			if (add_background_task(pid, args[0]) == -1) {
-				quit();
+				quit_from_shell();
 			}
 		} else {
 			set_foreground_task(pid);
diff --git a/src/shegang.c b/src/shegang.c
index 61b02f5..50a59ca 100644
--- a/src/shegang.c
+++ b/src/shegang.c
@@ -17,6 +17,21 @@ extern tasks tasks_structure;
 extern char* username_color;
 extern char* pwd_color;
 
+void print_welcome_message(void) {
+	printf(
+		"%s     ____ %s   %s%sSHE#GANG - powerful command interpreter (shell) for linux written in C%s\n"
+		"%s  __/ / /_%s   %s%sBlazing fast, cool, simple shell in C%s\n"
+		"%s /_  . __/%s   %s%sdeveloped by alxvdev%s\n"
+		"%s/_    __/ %s   %s%shttps://github.com/alxvdev/shegang%s\n"
+		"%s /_/_/    %s   %sMIT License%s\n\n", GREEN,
+		RESET, GREEN, BOLD, RESET,
+		GREEN, RESET, GREEN, ITALIC, RESET,
+		GREEN, RESET, CYAN, DIM, RESET,
+		GREEN, RESET, CYAN, UNDERLINE, RESET,
+		GREEN, RESET, DIM, RESET
+	);
+}
+
 /**
  * @brief      main function
  *
@@ -36,19 +51,6 @@ int main(int argc, char** argv) {
 	load_config_aliases();
 	setup_isocline();
 
-	printf(
-		"%s     ____ %s   %s%sSHE#GANG - powerful command interpreter (shell) for linux written in C%s\n"
-		"%s  __/ / /_%s   %s%sBlazing fast, cool, simple shell in C%s\n"
-		"%s /_  . __/%s   %s%sdeveloped by alxvdev%s\n"
-		"%s/_    __/ %s   %s%shttps://github.com/alxvdev/shegang%s\n"
-		"%s /_/_/    %s   %sMIT License%s\n\n", GREEN,
-		RESET, GREEN, BOLD, RESET,
-		GREEN, RESET, GREEN, ITALIC, RESET,
-		GREEN, RESET, CYAN, DIM, RESET,
-		GREEN, RESET, CYAN, UNDERLINE, RESET,
-		GREEN, RESET, DIM, RESET
-	);
-
 	do {
 		display_ps();
 
