Skip to content

Commit d2870aa

Browse files
author
Alvaro Ruben Lopez Mohedano
committed
added function to .h
1 parent a9ad162 commit d2870aa

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

includes/minishell.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
/* ::: :::::::: */
44
/* minishell.h :+: :+: :+: */
55
/* +:+ +:+ +:+ */
6-
/* By: ysingh <ysingh@student.42.fr> +#+ +:+ +#+ */
6+
/* By: alvalope <alvalope@student.42.fr> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2023/05/31 18:55:13 by ysingh #+# #+# */
9-
/* Updated: 2023/08/16 21:23:28 by ysingh ### ########.fr */
9+
/* Updated: 2023/08/18 15:11:13 by alvalope ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -223,5 +223,6 @@ int condition2(char *cmd, t_master mas);
223223
int condition3(t_master mas);
224224
void if_dollar_int(t_master *mas);
225225
void init_all(t_master *mas, char *cmd);
226+
void do_search_and_replace(char *key, char *value);
226227

227228
#endif

src/builtin2.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: alvalope <[email protected]> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2023/08/04 10:26:58 by alvalope #+# #+# */
9-
/* Updated: 2023/08/18 15:08:53 by alvalope ### ########.fr */
9+
/* Updated: 2023/08/18 15:11:47 by alvalope ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -78,7 +78,7 @@ void execute_export(char **args)
7878
}
7979
}
8080
else
81-
do_search_and_replace(g_global.envp, var->key, var->value);
81+
do_search_and_replace(var->key, var->value);
8282
}
8383
free_var(var);
8484
g_global.exit_status = 0;

0 commit comments

Comments
 (0)