/* By: ljiriste <ljiriste@student.42prague.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/21 08:57:54 by ljiriste #+# #+# */
-/* Updated: 2024/07/22 22:54:45 by ljiriste ### ########.fr */
+/* Updated: 2024/08/01 09:28:18 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
char *get_word(const t_parse_tree_node *parent)
{
char *res;
- const t_parse_tree_node *word = ft_vec_caccess(&parent->children, 2);
+ const t_parse_tree_node *word = ft_vec_caccess(&parent->children, 0);
res = ft_strdup(word->token.str);
return (res);
int res;
res = save_redirections(&redirections, simple_command, env);
- res = res || save_assignments(&assignments, simple_command, env);
+ res = save_assignments(&assignments, simple_command, env) || res;
+ fields = NULL;
if (!res)
fields = expand(simple_command, env);
if (!fields || res)