Add a format for the version.

This commit is contained in:
Nicholas Marriott 2017-01-09 21:44:19 +00:00
parent 95f5d406e5
commit 36619607ba
2 changed files with 2 additions and 0 deletions

View File

@ -529,6 +529,7 @@ format_create(struct cmdq_item *item, int flags)
RB_INIT(&ft->tree); RB_INIT(&ft->tree);
ft->flags = flags; ft->flags = flags;
format_add(ft, "version", "%s", VERSION);
format_add_cb(ft, "host", format_cb_host); format_add_cb(ft, "host", format_cb_host);
format_add_cb(ft, "host_short", format_cb_host_short); format_add_cb(ft, "host_short", format_cb_host_short);
format_add_cb(ft, "pid", format_cb_pid); format_add_cb(ft, "pid", format_cb_pid);

1
tmux.1
View File

@ -3542,6 +3542,7 @@ The following variables are available, where appropriate:
.It Li "session_windows" Ta "" Ta "Number of windows in session" .It Li "session_windows" Ta "" Ta "Number of windows in session"
.It Li "socket_path" Ta "" Ta "Server socket path" .It Li "socket_path" Ta "" Ta "Server socket path"
.It Li "start_time" Ta "" Ta "Server start time" .It Li "start_time" Ta "" Ta "Server start time"
.It Li "version" Ta "" Ta "Server version"
.It Li "window_activity" Ta "" Ta "Integer time of window last activity" .It Li "window_activity" Ta "" Ta "Integer time of window last activity"
.It Li "window_activity_flag" Ta "" Ta "1 if window has activity" .It Li "window_activity_flag" Ta "" Ta "1 if window has activity"
.It Li "window_active" Ta "" Ta "1 if window active" .It Li "window_active" Ta "" Ta "1 if window active"