fix: "echo $" works

This commit is contained in:
Camille Chauvet
2023-03-22 14:59:19 +01:00
parent 72ff3ba134
commit b3d060874d
8 changed files with 19 additions and 14 deletions

View File

@ -115,10 +115,8 @@ int ft_cmds_parser(t_data *data, const char *line)
}
if (*data->cmds != NULL)
{
if (((t_cmd *) (*data->cmds)->content)->fd_in[0] == -1)
((t_cmd *) (*data->cmds)->content)->fd_in[0] = 0;
if (((t_cmd *) (ft_lstlast(*data->cmds))->content)->fd_out[0] == -1)
(((t_cmd *) (ft_lstlast(*data->cmds))->content)->fd_out[0] = 1);
ft_add_fd(((t_cmd *)(*data->cmds)->content)->fd_in, 0);
ft_add_fd(((t_cmd *)(ft_lstlast(*data->cmds))->content)->fd_out, 1);
}
ft_freer_tab_ultimate(1, tab);
return (0);