diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-28 15:09:25 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-28 15:09:25 +0200 |
commit | abec91e56b179d9d327da2d3d9ae960f5260e14f (patch) | |
tree | b59ef461abb50a1e81c8bd5350d6391711a2af05 /src/ft_e_builtins.c | |
parent | Ok cd (diff) | |
download | 42-minishell-abec91e56b179d9d327da2d3d9ae960f5260e14f.tar.gz 42-minishell-abec91e56b179d9d327da2d3d9ae960f5260e14f.tar.bz2 42-minishell-abec91e56b179d9d327da2d3d9ae960f5260e14f.tar.xz 42-minishell-abec91e56b179d9d327da2d3d9ae960f5260e14f.tar.zst 42-minishell-abec91e56b179d9d327da2d3d9ae960f5260e14f.zip |
Nice functional cd
Diffstat (limited to '')
-rw-r--r-- | src/ft_e_builtins.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ft_e_builtins.c b/src/ft_e_builtins.c index 1045856..c78a80c 100644 --- a/src/ft_e_builtins.c +++ b/src/ft_e_builtins.c @@ -16,7 +16,6 @@ #include <stdint.h> #include <unistd.h> -#include "ft_b_builtins.h" #include "ft_m_redirs.h" #include "ft_s_destroy.h" #include "ft_s_lcom.h" @@ -49,8 +48,11 @@ static void msh->ret = WEXITSTATUS(status); if (bu_id == 1 && msh->ret == 0) { - ft_b_cd(ptr->argv + 1, msh); + msh->bu_ptr[bu_id](ptr->argv + 1, msh); + /* TODO: export $PWD */ } + else if (bu_id == 6) + msh->bu_ptr[bu_id](ptr->argv + 1, msh); } void |