main loop

This commit is contained in:
gazhonsepaskwa committed 2025-02-03 15:04:29 +01:00
1 parent dbb7506a31
commit 010f965a71
3 files changed
+12 -6

No files matched your search

+8 -1
View File
@@ -77,11 +77,18 @@ int main(int ac, char **av, char **envp)
msh = init_msh(envp);
if (!msh)
return (1);
input = NULL;
while (1)
{
input = powerline();
while (!input || !input[0])
input = powerline();
ft_debug("input: %s\n", input);
ft_debug("powerline\n");
msh->head = parser(input, msh);
ft_debug("parsed\n");
msh->ex_code = execute_command(msh->head);
ft_debug("executed\n");
free(input);
input = NULL;
}
}