From: Lukáš Jiřiště Date: Wed, 28 Aug 2024 08:34:29 +0000 (+0200) Subject: Make variable assignment possible in subshell X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=27531d3a48d4f2d73df9b917352789391582035e;p=42%2Fminishell.git Make variable assignment possible in subshell Because of ASSIGNMENT_WORD filtering, subshell needs a special rule (the same as AND_IF, OR_IF) to permit variable assignment to be recognized imediatelly after subshell starts. --- diff --git a/src/tokenization.c b/src/tokenization.c index d41179d..5f5114a 100644 --- a/src/tokenization.c +++ b/src/tokenization.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/21 16:34:43 by ljiriste #+# #+# */ -/* Updated: 2024/08/27 13:36:27 by ljiriste ### ########.fr */ +/* Updated: 2024/08/28 10:32:02 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -211,7 +211,8 @@ void filter_assignment_word(t_vec *tokens) prev_token = ft_vec_caccess(tokens, i - 1); if (prev_token->type == g_tokens[ASSIGNMENT_WORD] || prev_token->type == g_tokens[AND_IF] - || prev_token->type == g_tokens[OR_IF]) + || prev_token->type == g_tokens[OR_IF] + || prev_token->type == g_tokens[LPARA]) { ++i; continue ;