hééééhééééééhééhéééhéééééhéééhé
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user