summaryrefslogtreecommitdiffstats
path: root/src/s_lcom.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-08-10 19:06:30 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-08-10 19:06:30 +0200
commitd9d98feb999b6f503b5ca330976dc30266016551 (patch)
tree5763beb8ffddfdf8a562f5a2c8507a3467c4f885 /src/s_lcom.c
parentWork in progress (diff)
download42-minishell-d9d98feb999b6f503b5ca330976dc30266016551.tar.gz
42-minishell-d9d98feb999b6f503b5ca330976dc30266016551.tar.bz2
42-minishell-d9d98feb999b6f503b5ca330976dc30266016551.tar.xz
42-minishell-d9d98feb999b6f503b5ca330976dc30266016551.tar.zst
42-minishell-d9d98feb999b6f503b5ca330976dc30266016551.zip
Pretty damn good one-tap vars
Diffstat (limited to 'src/s_lcom.c')
-rw-r--r--src/s_lcom.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/s_lcom.c b/src/s_lcom.c
index 7ef64b3..536a8ff 100644
--- a/src/s_lcom.c
+++ b/src/s_lcom.c
@@ -17,6 +17,7 @@
#include "p_lcom.h"
#include "p_lcom_next.h"
#include "s_struct.h"
+#include "s_lcom_next.h"
static int8_t
fill_lcom(char *words[],
@@ -107,7 +108,7 @@ void
t_lcom
*lcom_new(const char word[],
- t_msh *msh)
+ t_msh *msh)
{
/* TODO: norme */
t_lcom *link;
@@ -135,6 +136,8 @@ t_lcom
if (!(words = p_subst_vars(words, msh)))
return (NULL);
words = p_check_args_equals(words, msh);
+ if (msh->env_fork_tmp[0][0] != '\0')
+ lcom_cpy_env_fork(&link, msh);
if (fill_lcom(words, &link) < 0)
{
ft_delwords(words);