From f8bb8b120e6d8a207d1e34d139ecbb30653f36d6 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 25 Apr 2020 15:41:44 +0200 Subject: Nice redirs --- src/ft_s_lcom.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ft_s_lcom.c') diff --git a/src/ft_s_lcom.c b/src/ft_s_lcom.c index de09e5c..d05d84c 100644 --- a/src/ft_s_lcom.c +++ b/src/ft_s_lcom.c @@ -13,7 +13,9 @@ #include #include #include + #include "ft_p_lcom.h" +#include "ft_p_lcom_next.h" #include "ft_s_struct.h" static int8_t @@ -32,7 +34,7 @@ static int8_t while(words[i]) { /* TODO: better <> cut ex: "msh ~> echo qwe>qwe" | gl hf */ - if (ft_ischarset("<>", words[i][0])) + if (ft_ischarset("<>0123456789", words[i][0])) break ; i++; } @@ -109,10 +111,11 @@ t_lcom link->redir = 0; link->com = NULL; link->argv = NULL; + link->rdrfd = 0; link->rdrpath = NULL; if (ft_get_redir(word, &link) != 0) return (NULL); - if (!(words = ft_split(word, ' '))) + if (!(words = ft_subst_args(word, link->redir))) return (NULL); if (ft_fill_lcom(words, &link) < 0) { -- cgit v1.2.3