ajout des builtins pwd cd et export

This commit is contained in:
hugogogo
2021-11-11 17:44:42 +01:00
parent d65a701186
commit 47ae67ed14
12 changed files with 127 additions and 147 deletions

15
srcs/builtins/pwd.c Normal file
View File

@@ -0,0 +1,15 @@
#include "minishell.h"
int builtin_pwd(int argc, char *argv[], t_all *c)
{
char *pwd;
(void)argc;
(void)argv;
(void)c;
pwd = getcwd(NULL, 0);
write(1, pwd, ft_strlen(pwd));
write(1, "\n", 1);
return (0);
}