[ADD] clear screen at start of minishell

This commit is contained in:
mcolonna 2024-04-26 14:19:31 +02:00
parent 149bafef88
commit 581dad0146

View file

@ -6,15 +6,23 @@
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/23 14:33:45 by mcolonna #+# #+# */
/* Updated: 2024/04/26 12:24:58 by mcolonna ### ########.fr */
/* Updated: 2024/04/26 14:11:46 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
#include "include.h"
// Clean the screen (TODO)
static void execclear(void)
// Clean the screen
static void execclear(char *const envp[])
{
const t_memclass mc = mem_newclass(fatal_error);
t_command command;
command = parse_command(mc, "clear");
if (command.error)
return ;
execute_command(mc, command, envp);
mem_freeall(mc);
}
// Print hi :D
@ -55,7 +63,7 @@ int main(const int argc, const char *argv[], char *const envp[])
(void)argv;
(void)path;
(void)command;
execclear();
execclear(envp);
print_hi();
errorstatus = 0;
while (true)