diff --git a/Makefile b/Makefile index c2807eb..eab0908 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ # # # **************************************************************************** # -CC = cc +CC = clang SRCS_RAW = main.c\ lst_cmd.c\ cd.c\ diff --git a/srcs/minishell.h b/srcs/minishell.h index 43328c0..8f90e4d 100755 --- a/srcs/minishell.h +++ b/srcs/minishell.h @@ -73,6 +73,7 @@ void print_parsed_cmd(t_cmd *cmd);//debug void ft_exit(t_cmd *cmd, t_env *env, int error_code); char **env_to_char_tab(t_env *env); void handle_minishellrc(t_env *env); +t_cmd *handle_alias(t_cmd *cmd, t_env *env, t_alias *alias); int cd(t_cmd *args); #endif diff --git a/srcs/parsing.c b/srcs/parsing.c index 21fdc2e..1882f91 100755 --- a/srcs/parsing.c +++ b/srcs/parsing.c @@ -86,7 +86,7 @@ t_token_type get_token_type(char **command) return (res); } -t_cmd *parse_command(char *command, t_env *env) +t_cmd *parse_command(char *command, t_env *env, t_alis *aliases) { int in_quote; int in_dquote; @@ -114,5 +114,6 @@ t_cmd *parse_command(char *command, t_env *env) ft_putstr_fd("minishell: syntax error\n", 2); return (0); } + parsed_cmd = handle_alias(parsed_cmd, env, aliases); return (res); }