mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Store state shared between multiple commands in the queue in a shared
structure.
This commit is contained in:
10
format.c
10
format.c
@ -554,10 +554,12 @@ format_create(struct cmdq_item *item, int tag, int flags)
|
||||
format_add(ft, "socket_path", "%s", socket_path);
|
||||
format_add_tv(ft, "start_time", &start_time);
|
||||
|
||||
if (item != NULL && item->cmd != NULL)
|
||||
format_add(ft, "command", "%s", item->cmd->entry->name);
|
||||
if (item != NULL && item->formats != NULL)
|
||||
format_merge(ft, item->formats);
|
||||
if (item != NULL) {
|
||||
if (item->cmd != NULL)
|
||||
format_add(ft, "command", "%s", item->cmd->entry->name);
|
||||
if (item->shared != NULL && item->shared->formats != NULL)
|
||||
format_merge(ft, item->shared->formats);
|
||||
}
|
||||
|
||||
return (ft);
|
||||
}
|
||||
|
Reference in New Issue
Block a user