diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-20 09:57:08 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-20 09:57:08 +0000 |
commit | f2f1b8fc8180f205802f23e93c294c2cf65c117e (patch) | |
tree | 12dd11f3b93a6e68e82ce4150a69f4ce74d59555 /cmd-set-option.c | |
parent | 8d09be0cb1e4efad485cce299579d04a0db9d222 (diff) | |
download | rtmux-f2f1b8fc8180f205802f23e93c294c2cf65c117e.tar.gz rtmux-f2f1b8fc8180f205802f23e93c294c2cf65c117e.tar.bz2 rtmux-f2f1b8fc8180f205802f23e93c294c2cf65c117e.zip |
Add default-command option and change default to be $SHELL rather than $SHELL -l. Also try to read shell from passwd db if $SHELL isn't present.
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r-- | cmd-set-option.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c index b383c0a8..24d4a2f6 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -1,4 +1,4 @@ -/* $Id: cmd-set-option.c,v 1.9 2007-10-19 10:21:33 nicm Exp $ */ +/* $Id: cmd-set-option.c,v 1.10 2007-10-20 09:57:08 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -186,6 +186,13 @@ cmd_set_option_exec(void *ptr, unused struct cmd_ctx *ctx) ctx->error(ctx, "unknown bell-action: %s", data->value); return; } + } else if (strcmp(data->option, "default-command") == 0) { + if (data->value == NULL) { + ctx->error(ctx, "invalid value"); + return; + } + xfree(default_command); + default_command = xstrdup(data->value); } else { ctx->error(ctx, "unknown option: %s", data->option); return; |