-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathminishell.c
More file actions
34 lines (31 loc) · 1.21 KB
/
Copy pathminishell.c
File metadata and controls
34 lines (31 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* minishell.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dximenes <dximenes@student.42porto.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/20 11:21:51 by dximenes #+# #+# */
/* Updated: 2025/11/20 11:21:51 by dximenes ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int minishell(t_head *head)
{
char preprompt[9999];
char *prompt;
while (TRUE)
{
signal_handler();
prompt_prefix(preprompt);
prompt = readline(preprompt);
if (!prompt)
ft_exit(head, NULL);
if (!(*prompt))
continue ;
add_history(prompt);
parse(head, prompt);
execute_manager(head);
}
return (0);
}