From abec91e56b179d9d327da2d3d9ae960f5260e14f Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 28 Apr 2020 15:09:25 +0200 Subject: Nice functional cd --- src/ft_e_builtins.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ft_e_builtins.c') 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 #include -#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 -- cgit v1.2.3