Initial commit
This commit is contained in:
23
cmd/shell.c
Normal file
23
cmd/shell.c
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "cmd_utils.h"
|
||||
|
||||
#define clear() printf("\033[H\033[J")
|
||||
|
||||
int main() {
|
||||
int status_return = 0;
|
||||
char *cmd;
|
||||
char **args;
|
||||
|
||||
init_shell();
|
||||
|
||||
do {
|
||||
cmd = read_input();
|
||||
args = split_cmd(cmd);
|
||||
status_return = reverse_execute(args);
|
||||
|
||||
free(cmd);
|
||||
free(args);
|
||||
} while(status_return != 255);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user