summaryrefslogtreecommitdiffstats
path: root/src/ft_s_lcom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_s_lcom.c')
-rw-r--r--src/ft_s_lcom.c7
1 files changed, 5 insertions, 2 deletions
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 <libft.h>
#include <stdlib.h>
#include <stdint.h>
+
#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)
{