biralavor / 42_minishell

minishell, a 42 school team project to rebuild a tiny bash, using C language. Build with @Thais-Malheiros
MIT License
3 stars 0 forks source link

remove hardcode #185

Closed biralavor closed 2 months ago

biralavor commented 2 months ago

bool builtins_detector_with_possible_args(t_token_list lst) { t_token_list cmd;

cmd = lst;
while (cmd && cmd->type == WORD)
{
    if ((ft_strncmp(cmd->lexeme, "export", 6) == 0)
        || (ft_strncmp(cmd->lexeme, "unset", 5) == 0)
        || (ft_strncmp(cmd->lexeme, "env", 3) == 0))
        return (true);
    cmd = cmd->next;
}
return (false);

}