diff --git a/Makefile b/Makefile index d7711e5..8026f3b 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: apommier +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2022/03/06 12:50:24 by apommier #+# #+# # -# Updated: 2022/03/06 16:59:33 by apommier ### ########.fr # +# Updated: 2022/03/06 17:29:26 by apommier ### ########.fr # # # # **************************************************************************** # @@ -14,7 +14,7 @@ NAME = minishell SRCS = main.c OBJS = ${SRCS:.c=.o} -CC = gcc +CC = clang #CFLAGS = -Wall -Wextra LIB = -lreadline #CFLAGS = -Wall -Wextra -Werror @@ -23,7 +23,7 @@ LIBFT = ./libft ${NAME}: ${OBJS} @make bonus -C ${LIBFT} - @${CC} ${CFLAGS} ${OBJS} ${LIBFT}/libft.a ${LIB} -o ${NAME} + @${CC} ${LIB} ${OBJS} ${LIBFT}/libft.a -o ${NAME} all: ${NAME} bonus diff --git a/main.c b/main.c index 8b11efc..9f27c2f 100644 --- a/main.c +++ b/main.c @@ -6,20 +6,27 @@ /* By: apommier +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/03/06 13:27:11 by apommier #+# #+# */ -/* Updated: 2022/03/06 17:01:22 by apommier ### ########.fr */ +/* Updated: 2022/03/06 17:41:41 by apommier ### ########.fr */ /* */ /* ************************************************************************** */ #include "minishell.h" +void color() +{ + printf("\033[0m"); +} + int main(int ac, char **av, char **path) { - char *input; + char *input; printf("---MINISHELL START---\n"); - while (1); + while (1) { - input = readline("$-"); + color(); + input = readline("$~ "); + add_history(input); } return (0); -} \ No newline at end of file +} diff --git a/minishell.h b/minishell.h index f765d45..48b125c 100644 --- a/minishell.h +++ b/minishell.h @@ -43,6 +43,6 @@ typedef struct s_command { } t_cmd; //main.c -int main(int ac, char **av, char **path); +int main();//int ac, char **av, char **path); #endif \ No newline at end of file