mirror of
https://github.com/tmux/tmux.git
synced 2025-11-06 03:26:05 +00:00
Set window title to current session. New options set-titles to disable.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-set-option.c,v 1.28 2008-06-16 06:33:50 nicm Exp $ */
|
||||
/* $Id: cmd-set-option.c,v 1.29 2008-06-18 18:52:44 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@@ -272,6 +272,14 @@ cmd_set_option_exec(struct cmd *self, unused struct cmd_ctx *ctx)
|
||||
return;
|
||||
}
|
||||
options_set_number(oo, "status-interval", number);
|
||||
} else if (strcmp(data->option, "set-titles") == 0) {
|
||||
if (bool == -1) {
|
||||
ctx->error(ctx, "bad value: %s", data->value);
|
||||
return;
|
||||
}
|
||||
if (bool == -2)
|
||||
bool = !options_get_number(oo, "set-titles");
|
||||
options_set_number(oo, "set-titles", bool);
|
||||
} else {
|
||||
ctx->error(ctx, "unknown option: %s", data->option);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user