diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-10-02 06:55:49 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-10-02 06:55:49 +0000 |
commit | 89787d95ef3f4df79f2277b1063d6690ca0983cd (patch) | |
tree | 28ed8d7d5cc8ca09b9be3ae88afb4ce656d64b9b /usr.bin/tmux | |
parent | f3f71a2f2697da7a5a985ff8ae429bede9c93238 (diff) |
Add a few more formats for panes (tty, pid, start cmd/cwd).
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/format.c | 8 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 1d16ee94e93..98b54613bfd 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.1 2011/08/26 10:53:16 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.2 2011/10/02 06:55:48 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -343,4 +343,10 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp) format_add(ft, "pane_id", "%%%u", wp->id); format_add(ft, "pane_active", "%d", wp == wp->window->active); format_add(ft, "pane_dead", "%d", wp->fd == -1); + if (wp->cmd != NULL) + 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_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 bb2298067f7..d758f8f7991 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.248 2011/09/28 20:11:21 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.249 2011/10/02 06:55:48 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: September 28 2011 $ +.Dd $Mdocdate: October 2 2011 $ .Dt TMUX 1 .Os .Sh NAME @@ -2603,7 +2603,11 @@ The following variables are available, where appropriate: .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" +.It Li "pane_pid" Ta "PID of first process in pane" +.It Li "pane_start_command" Ta "Command pane started with" +.It Li "pane_start_path" Ta "Path pane started with" .It Li "pane_title" Ta "Title of pane" +.It Li "pane_tty" Ta "Pseudo terminal of pane" .It Li "pane_width" Ta "Width of pane" .It Li "session_attached" Ta "1 if session attached" .It Li "session_created" Ta "Integer time session created" |