Add session_path from Chris Ruegge in GitHub issue 2142.

pull/2151/head
nicm 2020-03-31 11:58:05 +00:00
parent 01b3bb8e2c
commit 2a4714e76b
2 changed files with 2 additions and 0 deletions

View File

@ -2477,6 +2477,7 @@ format_defaults_session(struct format_tree *ft, struct session *s)
ft->s = s;
format_add(ft, "session_name", "%s", s->name);
format_add(ft, "session_path", "%s", s->cwd);
format_add(ft, "session_windows", "%u", winlink_count(&s->windows));
format_add(ft, "session_id", "$%u", s->id);

1
tmux.1
View File

@ -4422,6 +4422,7 @@ The following variables are available, where appropriate:
.It Li "session_last_attached" Ta "" Ta "Time session last attached"
.It Li "session_many_attached" Ta "" Ta "1 if multiple clients attached"
.It Li "session_name" Ta "#S" Ta "Name of session"
.It Li "session_path" Ta "" Ta "Working directory of session"
.It Li "session_stack" Ta "" Ta "Window indexes in most recent order"
.It Li "session_windows" Ta "" Ta "Number of windows in session"
.It Li "socket_path" Ta "" Ta "Server socket path"