diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-08-03 14:10:54 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-08-03 14:10:54 +0000 |
commit | 1673735f0271c6f87e6ba0d85d8b4a1d0f2f3d35 (patch) | |
tree | 27a8faaf2b54de7cf47d822da839c6d62368a44a /cmd-new-session.c | |
parent | e4bb08e1f5ebf47620758795efcbdd61849b73e8 (diff) |
Add a terminal-overrides session option allowing individual terminfo(5) entries
to be overridden. The 88col/256col checks are now moved into the default
setting and out of the code.
Also remove a couple of old workarounds for xterm and rxvt which are no longer
necessary (tmux can emulate them if missing).
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r-- | cmd-new-session.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c index ea2e5b12..c1ba6e30 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -108,7 +108,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx) { struct cmd_new_session_data *data = self->data; struct session *s; - char *cmd, *cwd, *cause; + char *overrides, *cmd, *cwd, *cause; int detached; u_int sx, sy; @@ -147,7 +147,9 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx) return (-1); } - if (tty_open(&ctx->cmdclient->tty, &cause) != 0) { + overrides = + options_get_string(&global_s_options, "terminal-overrides"); + if (tty_open(&ctx->cmdclient->tty, overrides, &cause) != 0) { ctx->error(ctx, "open terminal failed: %s", cause); xfree(cause); return (-1); |