diff options
Diffstat (limited to 'src/ft_b_cd.c')
-rw-r--r-- | src/ft_b_cd.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ft_b_cd.c b/src/ft_b_cd.c index c0bf04b..eedb1c2 100644 --- a/src/ft_b_cd.c +++ b/src/ft_b_cd.c @@ -11,14 +11,24 @@ /* ************************************************************************** */ #include <stdint.h> +#include <unistd.h> + #include "ft_s_struct.h" +#include "ft_u_utils.h" uint8_t ft_b_cd(char *args[], t_msh *msh) { - (void)args; + char *path; + (void)msh; + if (!args) + { + path = ft_get_home_dir(msh); + chdir(); + ft_memdel((void*)&path); + } /* TODO: do cd */ return (0); } |