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:
14
src/main.c
14
src/main.c
@ -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);
|
||||
|
Reference in New Issue
Block a user