mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Add cmdq as an argument to format_create and add a format for the
command name (will also be used for more later).
This commit is contained in:
5
format.c
5
format.c
@ -465,7 +465,7 @@ format_cb_pane_tabs(struct format_tree *ft, struct format_entry *fe)
|
||||
|
||||
/* Create a new tree. */
|
||||
struct format_tree *
|
||||
format_create(int flags)
|
||||
format_create(struct cmd_q *cmdq, int flags)
|
||||
{
|
||||
struct format_tree *ft;
|
||||
|
||||
@ -484,6 +484,9 @@ format_create(int flags)
|
||||
format_add(ft, "socket_path", "%s", socket_path);
|
||||
format_add_tv(ft, "start_time", &start_time);
|
||||
|
||||
if (cmdq != NULL && cmdq->cmd != NULL)
|
||||
format_add(ft, "command_name", "%s", cmdq->cmd->entry->name);
|
||||
|
||||
return (ft);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user