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).
This commit is contained in:
Nicholas Marriott
2009-08-03 14:10:54 +00:00
parent e4bb08e1f5
commit 1673735f02
9 changed files with 137 additions and 29 deletions

View File

@ -43,7 +43,7 @@ cmd_attach_session_exec(struct cmd *self, struct cmd_ctx *ctx)
struct cmd_target_data *data = self->data;
struct session *s;
struct client *c;
char *cause;
char *overrides, *cause;
u_int i;
if (ARRAY_LENGTH(&sessions) == 0) {
@ -80,7 +80,9 @@ cmd_attach_session_exec(struct cmd *self, struct cmd_ctx *ctx)
return (-1);
}
if (tty_open(&ctx->cmdclient->tty, &cause) != 0) {
overrides =
options_get_string(&s->options, "terminal-overrides");
if (tty_open(&ctx->cmdclient->tty, overrides, &cause) != 0) {
ctx->error(ctx, "terminal open failed: %s", cause);
xfree(cause);
return (-1);