|
|
@ -6,7 +6,7 @@ |
|
|
|
/* By: mea <mea@student.42.fr> +#+ +:+ +#+ */ |
|
|
|
/* +#+#+#+#+#+ +#+ */ |
|
|
|
/* Created: 2022/05/02 16:09:25 by narnaud #+# #+# */ |
|
|
|
/* Updated: 2022/05/18 14:58:51 by narnaud@stude ### ########.fr */ |
|
|
|
/* Updated: 2022/05/24 08:25:06 by narnaud ### ########.fr */ |
|
|
|
/* */ |
|
|
|
/* ************************************************************************** */ |
|
|
|
|
|
|
@ -54,7 +54,7 @@ static size_t count_arguments(t_token *tok) |
|
|
|
if (tok->type == WORD) |
|
|
|
ret++; |
|
|
|
if (tok->value[0] == '(') |
|
|
|
ret++; |
|
|
|
ret += 2; |
|
|
|
tok = tok->next; |
|
|
|
} |
|
|
|
return (ret); |
|
|
@ -69,6 +69,7 @@ static t_token *parse_cmd(t_datas *datas, t_token *tok, t_command *cmd) |
|
|
|
if (tok->value[0] == '(') |
|
|
|
{ |
|
|
|
cmd->argv[cmd->argc++] = get_var_value(datas, "MINISH", 7); |
|
|
|
cmd->argv[cmd->argc++] = ft_strdup("-c"); |
|
|
|
cmd->argv[cmd->argc++] = ft_substr(tok->value, |
|
|
|
1, ft_strlen(tok->value) - 2); |
|
|
|
} |
|
|
|