redirect readline() prompt to stderr (like bash)

useful for testing program.
This commit is contained in:
LuckyLaszlo
2021-12-02 01:47:14 +01:00
parent d710f5ef68
commit fb1974dd3b

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/08 09:22:12 by lperrey #+# #+# */
/* Updated: 2021/12/02 01:32:18 by lperrey ### ########.fr */
/* Updated: 2021/12/02 01:38:22 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -18,6 +18,7 @@ static int init_readline_hook(void);
int init(t_all *c)
{
ft_bzero(c, sizeof (*c));
rl_outstream = stderr;
rl_startup_hook = init_readline_hook;
readline(NULL);
rl_startup_hook = NULL;