summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions.c15
-rw-r--r--src/actions.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c
index afa855a..5bf33ea 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -67,6 +67,7 @@ static user_command user_commands[] =
{"windows", cmd_windows, arg_VOID},
{"setenv", cmd_setenv, arg_STRING},
{"chdir", cmd_chdir, arg_STRING},
+ {"unsetenv", cmd_unsetenv, arg_STRING},
/* Commands to set default behavior. */
{"defbarloc", cmd_defbarloc, arg_STRING},
@@ -1824,3 +1825,17 @@ cmd_chdir (int interactive, void *data)
chdir ((char *)data);
return NULL;
}
+
+char *
+cmd_unsetenv (int interactive, void *data)
+{
+ if (data == NULL)
+ {
+ message (" unsetenv: One argument is required ");
+ return NULL;
+ }
+
+ unsetenv ((char *)data);
+
+ return NULL;
+}
diff --git a/src/actions.h b/src/actions.h
index 0658c49..c73fdba 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -92,6 +92,7 @@ char * cmd_deffgcolor (int interactive, void *data);
char * cmd_defbgcolor (int interactive, void *data);
char * cmd_setenv (int interactive, void *data);
char * cmd_chdir (int interactive, void *data);
+char * cmd_unsetenv (int interactive, void *data);
/* void cmd_xterm (void *data); */