-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv_command.c
31 lines (27 loc) · 1.16 KB
/
env_command.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* env_command.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kblack <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/15 16:53:31 by kblack #+# #+# */
/* Updated: 2019/03/27 00:26:13 by kblack ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
/*
** Prints out the current environment variables when env() is called
*/
int handle_env(char **args, t_shell *sh)
{
t_env *var;
(void)args;
var = sh->env_info;
while (var)
{
ft_printf("%s=%s\n", var->key, var->value);
var = var->next;
}
return (1);
}