aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorChristopher Uhlig2025-01-14 18:18:58 +0100
committerChristopher Uhlig2025-01-14 18:18:58 +0100
commitda80405b345b58f9e1bd83039b1df3771b5ca193 (patch)
treed8ddb9fa078fa353dc55992dd9609a0c798e56ad /src/main.c
parent8c37f835ba29bcecc1d779edb396d97b18667026 (diff)
downloadminishell-da80405b345b58f9e1bd83039b1df3771b5ca193.tar.gz
minishell-da80405b345b58f9e1bd83039b1df3771b5ca193.zip
update for exit bit norm removed staic stuff added prompt flag
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index a53760c..8abc4c9 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/14 15:29:20 by chuhlig ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,13 +14,17 @@
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);
+ repl("Minishell $ ", &env, &promptflag);
+ free_envlst(&env);
+ return (0);
}