diff --git a/main.c b/main.c index e3e9e4d..5a54f8a 100644 --- a/main.c +++ b/main.c @@ -31,7 +31,8 @@ static char *ft_get_user_input(t_list **env) return (NULL); } line = readline(prompt); - add_history(line); + if (line != NULL && ft_strcmp(line, "") != 0) + add_history(line); free(prompt); return (line); }