From 2a4714e76b3a85b3391b05413f36623bcb1493f9 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 31 Mar 2020 11:58:05 +0000 Subject: Add session_path from Chris Ruegge in GitHub issue 2142. --- format.c | 1 + tmux.1 | 1 + 2 files changed, 2 insertions(+) diff --git a/format.c b/format.c index 15347e18..815be8da 100644 --- a/format.c +++ b/format.c @@ -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); diff --git a/tmux.1 b/tmux.1 index e370b4b1..667242db 100644 --- a/tmux.1 +++ b/tmux.1 @@ -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" -- cgit