From b831f8635409883e2ad2b6feedf05821f8f2ea84 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 1 Apr 2012 10:42:39 +0000 Subject: [PATCH] Add pane_current_path format, suggested by Mikolaj Kucharski. --- format.c | 1 + tmux.1 | 1 + 2 files changed, 2 insertions(+) diff --git a/format.c b/format.c index b7bcd71c..5403f170 100644 --- a/format.c +++ b/format.c @@ -389,6 +389,7 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp) format_add(ft, "pane_start_command", "%s", wp->cmd); if (wp->cwd != NULL) format_add(ft, "pane_start_path", "%s", wp->cwd); + format_add(ft, "pane_current_path", "%s", get_proc_cwd(wp->pid)); format_add(ft, "pane_pid", "%ld", (long) wp->pid); format_add(ft, "pane_tty", "%s", wp->tty); } diff --git a/tmux.1 b/tmux.1 index 971ba931..7b97cd81 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2779,6 +2779,7 @@ The following variables are available, where appropriate: .It Li "host" Ta "Hostname of local host" .It Li "line" Ta "Line number in the list" .It Li "pane_active" Ta "1 if active pane" +.It Li "pane_current_path" Ta "Current path if available" .It Li "pane_dead" Ta "1 if pane is dead" .It Li "pane_height" Ta "Height of pane" .It Li "pane_id" Ta "Unique pane ID"