Skip to content

Commit 04fc6b3

Browse files
committed
chore: Print welcome msg to stderr for consistency with readline
Readline's output also goes to stderr in bash.
1 parent a110fff commit 04fc6b3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

source/utils/print_utils.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: ldulling <[email protected]> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2024/04/02 18:49:43 by ldulling #+# #+# */
9-
/* Updated: 2024/04/04 22:35:55 by ldulling ### ########.fr */
9+
/* Updated: 2025/01/26 22:03:44 by ldulling ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -17,13 +17,12 @@ void print_welcome_msg(t_sh *shell)
1717
if (shell->is_interactive)
1818
{
1919
clear_terminal_soft();
20-
ft_printf("%s", WELCOME_ART1);
21-
ft_printf("%s", WELCOME_MSG);
20+
print_error("%s%s", WELCOME_ART1, WELCOME_MSG);
2221
}
2322
}
2423

2524
void clear_terminal_soft(void)
2625
{
2726
if (isatty(STDIN_FILENO))
28-
ft_printf("%s", "\e[2J\e[1;1H");
27+
print_error("%s", "\e[2J\e[1;1H");
2928
}

0 commit comments

Comments
 (0)