mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Expand formats in window and session names.
This commit is contained in:
@ -46,12 +46,17 @@ static enum cmd_retval
|
||||
cmd_rename_window_exec(struct cmd *self, struct cmdq_item *item)
|
||||
{
|
||||
struct args *args = self->args;
|
||||
struct client *c = cmd_find_client(item, NULL, 0);
|
||||
struct session *s = item->target.s;
|
||||
struct winlink *wl = item->target.wl;
|
||||
char *newname;
|
||||
|
||||
window_set_name(wl->window, args->argv[0]);
|
||||
newname = format_single(item, args->argv[0], c, s, wl, NULL);
|
||||
window_set_name(wl->window, newname);
|
||||
options_set_number(wl->window->options, "automatic-rename", 0);
|
||||
|
||||
server_status_window(wl->window);
|
||||
free(newname);
|
||||
|
||||
return (CMD_RETURN_NORMAL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user