diff options
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 15 |
1 files changed, 15 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; +} |