From 1533f395f6a1f3fe5315f07d382c9b247a9b7f09 Mon Sep 17 00:00:00 2001 From: ygor-sena Date: Thu, 6 Jun 2024 13:43:31 -0300 Subject: [PATCH 1/2] fix: remove overwritting when reaching prompt line limit --- src/minishell.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/minishell.c b/src/minishell.c index fd44995..3540f4b 100644 --- a/src/minishell.c +++ b/src/minishell.c @@ -3,16 +3,16 @@ /* ::: :::::::: */ /* minishell.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: mdias-ma +#+ +:+ +#+ */ +/* By: yde-goes +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/11/08 11:06:36 by mdias-ma #+# #+# */ -/* Updated: 2023/01/03 12:02:59 by mdias-ma ### ########.fr */ +/* Updated: 2024/06/06 13:33:31 by yde-goes ### ########.fr */ /* */ /* ************************************************************************** */ #include "minishell.h" -#define GREEN_PROMPT "\e[m\e[1;32m❯ \e[m" +#define GREEN_PROMPT "\001\e[m\e[1;32m❯ \e[m\002" static void msh_loop(void); From 834f6d9b303d6917f208e4edb44c4a420af0fa8f Mon Sep 17 00:00:00 2001 From: ygor-sena Date: Thu, 6 Jun 2024 13:58:58 -0300 Subject: [PATCH 2/2] fix: remove overwritting when reaching prompt line limit --- src/minishell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/minishell.c b/src/minishell.c index 087ee6a..2ce46ae 100644 --- a/src/minishell.c +++ b/src/minishell.c @@ -6,13 +6,13 @@ /* By: yde-goes +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/11/08 11:06:36 by mdias-ma #+# #+# */ -/* Updated: 2023/01/20 16:47:16 by yde-goes ### ########.fr */ +/* Updated: 2024/06/06 13:58:03 by yde-goes ### ########.fr */ /* */ /* ************************************************************************** */ #include "minishell.h" -#define GREEN_PROMPT "\e[m\e[1;32m❯ \e[m" +#define GREEN_PROMPT "\001\e[m\e[1;32m❯ \e[m\002" static void msh_loop(void); static void prompt_logo(void);