hééééhééééééhééhéééhéééééhéééhé

This commit is contained in:
2024-03-25 12:42:23 +01:00
parent b25a87953b
commit eb5f2bd32e
11 changed files with 13 additions and 284 deletions

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/02 21:59:20 by tomoron #+# #+# */
/* Updated: 2024/03/23 19:24:40 by marde-vr ### ########.fr */
/* Updated: 2024/03/25 12:34:39 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -90,19 +90,16 @@ int main(int argc, char **argv, char **envp)
commands = (char *)1;
init_minishell(&msh, argc, argv, envp);
msh->aliases = alias_add_back(msh->aliases,
ft_strdup("ls"), ft_strdup("ls --color=auto"));
while (msh->env && commands)
{
prompt = get_prompt(msh->env);
if (!prompt)
exit(STDIN_FILENO);
exit(1);
commands = readline(prompt);
free(prompt);
add_history(commands);
msh->cmds = parse_command(commands, msh->env);
free(commands);
msh->cmds = handle_alias(msh);
exec_commands(msh);
free_cmd(msh->cmds);
}