diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-10-15 10:34:16 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-10-15 10:34:16 +0200 |
| commit | 5e327efa642d03bf960716b5058c3d618f5b893f (patch) | |
| tree | e7b5074c00b7caee9c4bbd4fb10ad48dda05399b /src/lexer | |
| parent | 753630fe796eb53976696972ee7e20aebd8b1365 (diff) | |
| download | minishell-5e327efa642d03bf960716b5058c3d618f5b893f.tar.gz minishell-5e327efa642d03bf960716b5058c3d618f5b893f.tar.bz2 minishell-5e327efa642d03bf960716b5058c3d618f5b893f.zip | |
Fixing append redirection labeled has truncate redirection
Diffstat (limited to 'src/lexer')
| -rw-r--r-- | src/lexer/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lexer/utils.c b/src/lexer/utils.c index 0d8080c..b16a69a 100644 --- a/src/lexer/utils.c +++ b/src/lexer/utils.c @@ -6,7 +6,7 @@ /* By: nahaddac <nahaddac@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/07/16 08:18:15 by nahaddac #+# #+# */ -/* Updated: 2020/10/10 08:38:46 by cacharle ### ########.fr */ +/* Updated: 2020/10/15 10:32:00 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,12 +22,12 @@ enum e_tok tok_assign_tag(char *content) return (TAG_OR); if (content[0] == '|') return (TAG_PIPE); + if (ft_strncmp(content, ">>", 2) == 0) + return (TAG_REDIR_APPEND); if (content[0] == '>') return (TAG_REDIR_OUT); if (content[0] == '<') return (TAG_REDIR_IN); - if (ft_strncmp(content, ">>", 2) == 0) - return (TAG_REDIR_APPEND); if (content[0] == '(') return (TAG_PARENT_OPEN); if (content[0] == ')') |
