diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-06 21:56:20 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-06 21:56:20 +0200 |
commit | 4543c3ba3222d47780ad3e091cfe6f3098cc2bca (patch) | |
tree | fb8a70bf05464a6fa2c820cc43ea34421340c903 /src/s_com.c | |
parent | Commit from minishell (diff) | |
download | 42-minishell-4543c3ba3222d47780ad3e091cfe6f3098cc2bca.tar.gz 42-minishell-4543c3ba3222d47780ad3e091cfe6f3098cc2bca.tar.bz2 42-minishell-4543c3ba3222d47780ad3e091cfe6f3098cc2bca.tar.xz 42-minishell-4543c3ba3222d47780ad3e091cfe6f3098cc2bca.tar.zst 42-minishell-4543c3ba3222d47780ad3e091cfe6f3098cc2bca.zip |
Stacked
Diffstat (limited to 'src/s_com.c')
-rw-r--r-- | src/s_com.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/s_com.c b/src/s_com.c index 99b3158..ac23f35 100644 --- a/src/s_com.c +++ b/src/s_com.c @@ -112,12 +112,11 @@ t_com com->rdrfd = 0; com->rdrpath = NULL; com->env_fork = NULL; - if (get_redir(word, &com) != 0) + if (p_get_redir(word, &com) != 0) return (NULL); - if ((words = p_split_args(word, com->redir)) == NULL) + if ((word = p_subst_vars(word, msh)) == NULL) return (NULL); - /* TODO: subst vars is before getting words fuck my life */ - if ((words = p_subst_vars(words, msh)) == NULL) + if ((words = p_split_args(word, com->redir)) == NULL) return (NULL); if ((words = p_subst_home(words, msh)) == NULL) return (NULL); |