diff --git a/fille.txt b/fille.txt new file mode 100755 index 0000000..9d5dd50 --- /dev/null +++ b/fille.txt @@ -0,0 +1,17 @@ +total 1376 +drwxrwxr-x 2 simplonco simplonco 4096 oct. 30 15:32 builds +-rw-rw-r-- 1 simplonco simplonco 0 oct. 28 21:00 cat +-rw-rw-r-- 1 simplonco simplonco 125 oct. 28 21:00 echo +-rwxrwxr-x 1 simplonco simplonco 150 oct. 28 21:03 file.txt +-rwx------ 1 simplonco simplonco 0 oct. 30 15:33 fille.txt +drwxrwxr-x 2 simplonco simplonco 4096 oct. 28 21:10 headers +drwxrwxr-x 8 simplonco simplonco 4096 oct. 23 20:48 libft +-rw-rw-r-- 1 simplonco simplonco 1412 oct. 29 12:32 Makefile +-rwxrwxr-x 1 simplonco simplonco 72256 oct. 30 15:32 minishell +-rw-rw-r-- 1 simplonco simplonco 1273353 oct. 7 21:29 minishell.en.subject.pdf +-rw-rw-r-- 1 simplonco simplonco 3365 oct. 27 14:47 parsing.txt +-rw-rw-r-- 1 simplonco simplonco 15216 oct. 28 21:00 README.md +drwxrwxr-x 2 simplonco simplonco 4096 oct. 28 21:00 ressources +drwxrwxr-x 4 simplonco simplonco 4096 oct. 30 15:32 srcs +drwxrwxr-x 2 simplonco simplonco 4096 oct. 27 14:47 tests +-rw-rw-r-- 1 simplonco simplonco 58 oct. 13 17:38 valgrind_readline.supp diff --git a/srcs/shell_loop.c b/srcs/shell_loop.c index 8bef7cb..4283afd 100644 --- a/srcs/shell_loop.c +++ b/srcs/shell_loop.c @@ -6,7 +6,7 @@ /* By: lperrey +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/10/04 05:59:26 by lperrey #+# #+# */ -/* Updated: 2021/10/30 14:37:31 by hulamy ### ########.fr */ +/* Updated: 2021/10/30 15:32:49 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ @@ -77,14 +77,17 @@ void shell_loop(t_all *c) // builtin_echo(ft_lstsize((t_list *)c->token_list) + 1, tokens_list_to_argv(c->token_list), c); // else // { + c->cmd_arr = parsing(c->token_list, c->envp); + if (c->cmd_arr == NULL) ft_putstr_fd("Syntax KO:\n-----------\n", 1); - else - ft_putstr_fd("Syntax OK:\n-----------\n", 1); - ft_putstr_fd("TOKENS LIST :\n-----------\n", 1); - ft_lstprint((t_list *)c->token_list, 1); -// execute_cmd(c->envp, c->cmd_arr); + // else + // ft_putstr_fd("Syntax OK:\n-----------\n", 1); + // ft_putstr_fd("TOKENS LIST :\n-----------\n", 1); + // ft_lstprint((t_list *)c->token_list, 1); + + execute_cmd(c->envp, c->cmd_arr); ft_lstclear((t_list **)&c->token_list, free); // } }