summaryrefslogtreecommitdiffstats
path: root/src/s_com.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/s_com.c')
-rw-r--r--src/s_com.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/s_com.c b/src/s_com.c
index a5c594a..b899555 100644
--- a/src/s_com.c
+++ b/src/s_com.c
@@ -103,6 +103,7 @@ t_com
char nword[ARG_MAX];
t_com *com;
char **words;
+ size_t ret;
if ((com = (t_com*)malloc(sizeof(t_com))) == NULL)
return (NULL);
@@ -117,7 +118,11 @@ t_com
if (p_get_redir(nword, &com) != 0)
return (NULL);
if (msh->alias != NULL)
- p_subst_alias(nword, msh);
+ {
+ ret = p_subst_alias(nword, TRUE, msh);
+ while (ret != 0)
+ ret = p_subst_alias(nword, TRUE, msh);
+ }
p_subst_vars(nword, msh);
if ((words = p_split_args(nword, com->redir)) == NULL)
return (NULL);