summaryrefslogtreecommitdiffstats
path: root/src/ft_b_cd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_b_cd.c')
-rw-r--r--src/ft_b_cd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ft_b_cd.c b/src/ft_b_cd.c
index cbb392a..7d4ef1a 100644
--- a/src/ft_b_cd.c
+++ b/src/ft_b_cd.c
@@ -16,6 +16,7 @@
#include "ft_s_struct.h"
#include "ft_u_utils.h"
+#include "ft_u_vars.h"
/* static void */
/* ft_switch_env_var(char **envp) */
@@ -45,7 +46,8 @@ uint8_t
if (argc == 0)
{
- path = ft_get_home_dir(msh->envp);
+ path = ft_subst_var_value("$HOME", msh);
+ ft_printf("%s\n", path);
}
if (chdir(path) != 0)
{