-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_read_input.c
31 lines (27 loc) · 1.17 KB
/
ft_read_input.c
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_read_input.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ikgonzal <ikgonzal@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/24 13:31:33 by ikgonzal #+# #+# */
/* Updated: 2022/04/14 14:12:49 by jsolinis ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
void ft_read_input(t_proc *proc)
{
proc->line_read = readline(proc->prompt);
listen_signals_daddy();
add_history(proc->line_read);
}
void get_prompt(t_proc *proc)
{
proc->prompt = "@papa$hell: ";
}
void ft_create_terminal(t_proc *proc)
{
get_prompt(proc);
ft_read_input(proc);
}