aboutsummaryrefslogtreecommitdiff
path: root/src/builtin/env.c
blob: 352e2c362db8f0b1cb5b689421c9244e3d2306a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
** \file   env.c
** \brief  `env` builtin
*/

#include "minishell.h"

void	st_print_env_variable(t_ftht_entry *entry)
{
	ft_putstr(entry->key);
	ft_putchar('=');
	ft_putstr((char*)entry->value);
	ft_putchar('\n');
}

int		builtin_env(char **argv, t_env env)
{
	(void)argv;
	ft_htiter(env, st_print_env_variable);
	return (0);
}