aboutsummaryrefslogtreecommitdiff
path: root/src/builtin/export.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/builtin/export.c')
-rw-r--r--src/builtin/export.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/builtin/export.c b/src/builtin/export.c
index f19842e..4ac6626 100644
--- a/src/builtin/export.c
+++ b/src/builtin/export.c
@@ -6,7 +6,7 @@
/* By: charles <charles@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/01 17:11:34 by charles #+# #+# */
-/* Updated: 2020/09/13 14:16:28 by charles ### ########.fr */
+/* Updated: 2020/09/13 20:22:10 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -17,6 +17,11 @@
#include "minishell.h"
+/*
+** \brief Put an environment variable in the format "declare -x id=value" of bash
+** \param s Full variable (id=value)
+*/
+
static void st_put_declare_x(char *s)
{
char *equal_ptr;
@@ -51,6 +56,13 @@ static void st_put_declare_x(char *s)
ft_putchar('\n');
}
+/*
+** \brief Export variables to the environment
+** \param argv arguments
+** \param env environment
+** \return a status code or EVAL_FATAL on fatal error
+*/
+
int builtin_export(char **argv, t_env env)
{
int status;