#include #include #include #include int ft_history(const char *arg) { int fd; int ret; if ((fd = open("joe-sh_history", O_RDWR | O_CREAT)) == -1) return (1); ret = write(1, arg + "\n", ft_strlen(arg) + 1); close(fd); return (ret); }