aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorChristopher Uhlig2025-01-22 02:40:27 +0100
committerChristopher Uhlig2025-01-22 02:40:27 +0100
commitf6e474d27a1398c6d4f2e88c7f2d3797b85217da (patch)
tree7dd7bd5f2a151b39498991b567ae51cff8242782 /src/main.c
parent78dc50a2bce3c6e31405437189e2990d8fc720ac (diff)
downloadminishell-f6e474d27a1398c6d4f2e88c7f2d3797b85217da.tar.gz
minishell-f6e474d27a1398c6d4f2e88c7f2d3797b85217da.zip
kinda fix for pipe error and again.vs for you db just chnage workfolder gn
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index a53760c..e863f3a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -6,7 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/22 17:14:03 by dkaiser #+# #+# */
-/* Updated: 2024/12/17 19:26:42 by chuhlig ### ########.fr */
+/* Updated: 2025/01/22 01:49:12 by chuhlig ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,13 +14,18 @@
int main(int argc, char *argv[], char *envp[])
{
- t_env *env;
+ t_env *env;
+ static int promptflag;
env = NULL;
+ promptflag = 0;
if (!argc && !argv)
return (1);
if (init())
return (1);
getenvlst(&env, envp);
- repl("Minishell $ ", &env);
+ set_return_code(0, &env);
+ repl("Minishell $ ", &env, &promptflag);
+ free_envlst(&env);
+ return (0);
}