shell_script()
+ reset "rl_event_hook" to NULL after here_doc() + split init.c in multiple files + submodule minishell_tests
This commit is contained in:
12
srcs/main.c
12
srcs/main.c
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/04 05:59:26 by lperrey #+# #+# */
|
||||
/* Updated: 2021/11/29 12:43:34 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/12/18 05:08:48 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -17,13 +17,11 @@ int main(int argc, char *argv[])
|
||||
t_all c;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
if (!init(&c))
|
||||
if (!init(&c, argv))
|
||||
exit_free(&c, EXIT_FAILURE);
|
||||
//putenv("VAR=W1 W2 W3"); // TEMP TEST
|
||||
// if (argv[1] || !isatty(STDIN_FILENO))
|
||||
// shell_script(&c);
|
||||
// else
|
||||
if (!isatty(STDIN_FILENO))
|
||||
shell_script(&c);
|
||||
else
|
||||
shell_loop(&c);
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user