diff --git a/builtins/.echo.c.swp b/builtins/.echo.c.swp deleted file mode 100644 index 89a016f..0000000 Binary files a/builtins/.echo.c.swp and /dev/null differ diff --git a/execution.c b/execution.c index d833c55..a3fe3a7 100644 --- a/execution.c +++ b/execution.c @@ -6,7 +6,7 @@ /* By: cchauvet executable, "export") == 0) return_code = (print_export(env, cmd->fd_out)); else if (ft_strcmp(cmd->executable, "cd") == 0) - return_code = (move_folder(cmd->args[0], cmd->fd_out)); + return_code = (move_folder(cmd->args[1], cmd->fd_out)); /* if (ft_strcmp(cmd->executable, "unset") == 0) */ /* return_code = (unset(env, cmd->args, cmd->fd_out)); */ else if (ft_strcmp(cmd->executable, "echo") == 0) diff --git a/main.c b/main.c index ad1eef6..2cfb11c 100644 --- a/main.c +++ b/main.c @@ -6,11 +6,10 @@ /* By: cchauvet 2 && (str[i] == '>' || str[i] == '<')) || (y > 1 && str[i] == '|')) { - ft_eprintf("minishell: to many %c in a row", str, str[i]); + ft_eprintf("minishell: too many %c in a row\n", str, str[i]); return (1); } i = i + y; @@ -96,8 +96,6 @@ int ft_empty_verif(const char *str) i = 0; while (str[i] == ' ') i++; - if (str[i] == '\0') - ft_eprintf("minishell: %s: command not found \n", str); return (str[i] == '\0'); }