modif sur le makefile, ~ dans le prompt

This commit is contained in:
2024-02-18 15:53:17 +01:00
parent 7b5b5338a4
commit cec4e7a3a3
7 changed files with 33 additions and 19 deletions

View File

@ -6,7 +6,7 @@
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/17 02:54:36 by tomoron #+# #+# */
/* Updated: 2024/02/17 04:26:57 by tomoron ### ########.fr */
/* Updated: 2024/02/18 13:35:11 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -19,7 +19,9 @@ t_cmd *handle_alias(t_cmd *cmd, t_env *env, t_alias *alias)
char *alias_command;
alias_command = 0;
if(cmd && cmd->type == ARG)
if (!cmd)
return(0);
if(cmd->type == ARG)
alias_command = ft_get_alias(alias,cmd->token);
if(!alias_command)
return(cmd);
@ -27,6 +29,7 @@ t_cmd *handle_alias(t_cmd *cmd, t_env *env, t_alias *alias)
tmp = res;
while(tmp->next)
tmp = tmp->next;
tmp->next = cmd;
tmp->next = cmd->next;
free(cmd);
return(res);
}