[ADD] history

This commit is contained in:
joris schaft 2024-05-28 14:31:04 +02:00 committed by mcolonna
parent e0b059bea6
commit 1d6bd27675
2 changed files with 5 additions and 2 deletions

View file

@ -6,7 +6,7 @@
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */
/* Updated: 2024/05/16 18:18:16 by mcolonna ### ########.fr */
/* Updated: 2024/05/31 13:45:38 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -26,6 +26,8 @@
# include <sys/wait.h>
# include "libft.h"
# include "libtf.h"
# include <readline/history.h>
# include <readline/readline.h>
///// ASK COMMAND /////

View file

@ -6,7 +6,7 @@
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/23 14:33:45 by mcolonna #+# #+# */
/* Updated: 2024/05/17 14:39:43 by mcolonna ### ########.fr */
/* Updated: 2024/05/31 13:46:33 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -52,6 +52,7 @@ int main(const int argc, const char *argv[], char *const envp[])
{
mc = mem_subclass(fatal_error, g_mc);
command_str = ask_command(mc);
add_history(command_str);
do_command(envp, command_str);
}
return (errorstatus);