The branch, master has been updated via d8261019f1b1fcf58a79b82448e8851e3acfd026 (commit) from 9d165df18aa9731b6720cce9093e006f22d34914 (commit)
- Log ----------------------------------------------------------------- commit d8261019f1b1fcf58a79b82448e8851e3acfd026 Author: Nicholas Marriott <nicholas.marri...@gmail.com> Commit: Nicholas Marriott <nicholas.marri...@gmail.com> Add client_session and client_last_session formats. --- format.c | 12 ++++++++++-- tmux.1 | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/format.c b/format.c index abd6808..b3a6377 100644 --- a/format.c +++ b/format.c @@ -301,8 +301,9 @@ format_session(struct format_tree *ft, struct session *s) void format_client(struct format_tree *ft, struct client *c) { - char *tim; - time_t t; + char *tim; + time_t t; + struct session *s; format_add(ft, "client_cwd", "%s", c->cwd); format_add(ft, "client_height", "%u", c->tty.sy); @@ -333,6 +334,13 @@ format_client(struct format_tree *ft, struct client *c) format_add(ft, "client_readonly", "%d", 1); else format_add(ft, "client_readonly", "%d", 0); + + s = c->session; + if (s != NULL) + format_add(ft, "client_session", "%s", s->name); + s = c->last_session; + if (s != NULL && session_alive(s)) + format_add(ft, "client_last_session", "%s", s->name); } /* Set default format keys for a winlink. */ diff --git a/tmux.1 b/tmux.1 index 15f93dd..22ccb9a 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2968,8 +2968,10 @@ The following variables are available, where appropriate: .It Li "client_created_string" Ta "String time client created" .It Li "client_cwd" Ta "Working directory of client" .It Li "client_height" Ta "Height of client" +.It Li "client_last_session" Ta "Name of the client's last session" .It Li "client_prefix" Ta "1 if prefix key has been pressed" .It Li "client_readonly" Ta "1 if client is readonly" +.It Li "client_session" Ta "Name of the client's session" .It Li "client_termname" Ta "Terminal name of client" .It Li "client_tty" Ta "Pseudo terminal of client" .It Li "client_utf8" Ta "1 if client supports utf8" ----------------------------------------------------------------------- Summary of changes: format.c | 12 ++++++++++-- tmux.1 | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) hooks/post-receive -- tmux ------------------------------------------------------------------------------ The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials, tech docs, whitepapers, evaluation guides, and opinion stories. Check out the most recent posts - join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ tmux-cvs mailing list tmux-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-cvs