diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-12 18:11:56 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-12 18:11:56 +0200 |
commit | 3f726e2433438176a6b7f73df7d6bf51a185c5b2 (patch) | |
tree | 3aec31db54442d72feab07c2aaa57740e30c3ee3 | |
parent | In progress (diff) | |
download | 42-minishell-3f726e2433438176a6b7f73df7d6bf51a185c5b2.tar.gz 42-minishell-3f726e2433438176a6b7f73df7d6bf51a185c5b2.tar.bz2 42-minishell-3f726e2433438176a6b7f73df7d6bf51a185c5b2.tar.xz 42-minishell-3f726e2433438176a6b7f73df7d6bf51a185c5b2.tar.zst 42-minishell-3f726e2433438176a6b7f73df7d6bf51a185c5b2.zip |
Fix
-rw-r--r-- | src/b_alias.c | 4 | ||||
-rw-r--r-- | src/s_com.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/b_alias.c b/src/b_alias.c index 55b7232..5ca86da 100644 --- a/src/b_alias.c +++ b/src/b_alias.c @@ -28,11 +28,13 @@ static void /* char buff[255][255][ARG_MAX]; */ ptr = msh->alias; + i = 0; while (ptr != NULL) { - ft_printf("alias %s='%s'\n", ptr->name, ptr->val); ptr = ptr->next; + i++; } + ft_printf("alias %s='%s'\n", ptr->name, ptr->val); } static uint8_t diff --git a/src/s_com.c b/src/s_com.c index b899555..28b460f 100644 --- a/src/s_com.c +++ b/src/s_com.c @@ -121,7 +121,7 @@ t_com { ret = p_subst_alias(nword, TRUE, msh); while (ret != 0) - ret = p_subst_alias(nword, TRUE, msh); + ret = p_subst_alias(nword, FALSE, msh); } p_subst_vars(nword, msh); if ((words = p_split_args(nword, com->redir)) == NULL) |