Add pane_current_path format, suggested by Mikolaj Kucharski.

This commit is contained in:
Nicholas Marriott 2012-04-01 10:42:39 +00:00
parent c11da7ca88
commit b831f86354
2 changed files with 2 additions and 0 deletions

View File

@ -389,6 +389,7 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp)
format_add(ft, "pane_start_command", "%s", wp->cmd); format_add(ft, "pane_start_command", "%s", wp->cmd);
if (wp->cwd != NULL) if (wp->cwd != NULL)
format_add(ft, "pane_start_path", "%s", wp->cwd); 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_pid", "%ld", (long) wp->pid);
format_add(ft, "pane_tty", "%s", wp->tty); format_add(ft, "pane_tty", "%s", wp->tty);
} }

1
tmux.1
View File

@ -2779,6 +2779,7 @@ The following variables are available, where appropriate:
.It Li "host" Ta "Hostname of local host" .It Li "host" Ta "Hostname of local host"
.It Li "line" Ta "Line number in the list" .It Li "line" Ta "Line number in the list"
.It Li "pane_active" Ta "1 if active pane" .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_dead" Ta "1 if pane is dead"
.It Li "pane_height" Ta "Height of pane" .It Li "pane_height" Ta "Height of pane"
.It Li "pane_id" Ta "Unique pane ID" .It Li "pane_id" Ta "Unique pane ID"