prepare for cd builtin

This commit is contained in:
Tanguy MAZE
2018-11-28 17:29:40 +01:00
parent 4ce47a9f0b
commit 1edfe5167f
4 changed files with 48 additions and 13 deletions

View File

@@ -6,7 +6,7 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/27 15:32:29 by tmaze #+# #+# */
/* Updated: 2018/11/27 16:36:48 by tmaze ### ########.fr */
/* Updated: 2018/11/28 16:42:22 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
@@ -17,10 +17,9 @@
int exec_cmd(char **argv, char **env)
{
size_t i;
static t_builtin builtins[S_BIN] = {{"echo", &cmd_echo}};
static t_builtin builtins[S_BIN] = {{"echo", &cmd_echo}, {"cd", &cmd_cd}};
/* ,{"cd", &cmd_cd}, */
/* {"setenv", &cmd_senv},{"unsetenv", &cmd_senv}, {"env", &cmd_env}}; */
/*, {"setenv", &cmd_senv}, {"unsetenv", &cmd_senv}, {"env", &cmd_env}}; */
i = 0;
while (i < S_BIN)