From f496b7140e693cd96d8acfa6606e1236667e4242 Mon Sep 17 00:00:00 2001 From: y-syo Date: Tue, 16 Jul 2024 13:36:56 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=94=A8=E3=80=8D=20fix(builtins/f?= =?UTF-8?q?t=5Funset):=20fixed=20unset,=20now=20takes=20multiples=20argume?= =?UTF-8?q?nts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/builtins.h | 4 ++-- src/builtins/ft_unset.c | 13 +++++++++++-- src/exec/exec_cmd.c | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/include/builtins.h b/include/builtins.h index 0fe77ae..31715ff 100644 --- a/include/builtins.h +++ b/include/builtins.h @@ -6,7 +6,7 @@ /* By: mmoussou next; } } + +void ft_unset(char **args, t_env *env) +{ + while (*args) + { + ft_unset_arg(*args, env); + args++; + } +} diff --git a/src/exec/exec_cmd.c b/src/exec/exec_cmd.c index c106666..625f5f4 100644 --- a/src/exec/exec_cmd.c +++ b/src/exec/exec_cmd.c @@ -6,7 +6,7 @@ /* By: mmoussou