general fixes to redirects
This commit is contained in:
parent
ea90a00c33
commit
fd72fbb0d3
@ -14,7 +14,7 @@
|
||||
|
||||
static int is_command_token(t_token *token)
|
||||
{
|
||||
return (token->type < 3 || redirect_token_type(token));
|
||||
return (token->type < 3 || token->type == T_REDIRECT_IN || token->type ==T_HEREDOC || token->type == T_REDIRECT_OUT || token->type == T_APPEND_OUT);
|
||||
}
|
||||
|
||||
t_list *parser_get_commands(t_minishell *minishell)
|
||||
|
||||
@ -23,6 +23,8 @@ t_list *redirect_get_inputs(t_list *list)
|
||||
while (current)
|
||||
{
|
||||
token = (t_token *)current->content;
|
||||
if (token->type == T_PIPE || token->type == T_EOF)
|
||||
break ;
|
||||
if (token->type != T_REDIRECT_IN && token->type != T_HEREDOC)
|
||||
{
|
||||
current = current->next;
|
||||
|
||||
@ -23,6 +23,8 @@ t_list *redirect_get_outputs(t_list *list)
|
||||
while (current)
|
||||
{
|
||||
token = (t_token *)current->content;
|
||||
if (token->type == T_PIPE || token->type == T_EOF)
|
||||
break;
|
||||
if (token->type != T_REDIRECT_OUT && token->type != T_APPEND_OUT)
|
||||
{
|
||||
current = current->next;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user