diff options
-rw-r--r-- | usr.bin/tmux/format.c | 3 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 4b88ac41537..b4f3c758884 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.6 2012/02/02 00:03:45 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.7 2012/04/01 10:42:39 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index bab48a664b0..91e33ac70d0 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.286 2012/03/22 11:11:57 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.287 2012/04/01 10:42:39 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 22 2012 $ +.Dd $Mdocdate: April 1 2012 $ .Dt TMUX 1 .Os .Sh NAME @@ -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" |