mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-18 01:20:17 +02:00
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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user