1
0
mirror of https://github.com/KeyZox71/ft_minipowershell.git synced 2025-05-13 16:08:45 +02:00

🏗️」 wip: Started cd and pwd

This commit is contained in:
2024-06-25 10:38:07 +02:00
parent d9771f26a4
commit 5710f193d7
9 changed files with 146 additions and 19 deletions

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/24 11:18:04 by adjoly #+# #+# */
/* Updated: 2024/06/21 09:33:03 by mmoussou ### ########.fr */
/* Updated: 2024/06/24 12:47:08 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -17,6 +17,7 @@
#include <stdbool.h>
#include <fcntl.h>
#include "libft.h"
#include "builtins.h"
#include "minishell.h"
#include "parsing.h"
#include "prompt.h"
@ -86,6 +87,17 @@ int main(int ac, char **av, char **env)
continue ;
if (is_str(test, "exit"))
break ;
if (is_str(test, "pwd"))
{
ft_pwd(&env_l);
continue ;
}
if (is_str(test, "cd"))
{
ft_cd(&env_l, lll[1]);
continue ;
}
check_quote(test);
piped = tokenizer(test);
//check_redir(((t_token *)(piped->content))->redirection, av);
cmd_list = get_cmd_list(piped, &env_l);