From 7148f0a882587faf397181409745d735a3478428 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 7 Jul 2017 14:39:45 +0000 Subject: [PATCH] Add a pane_pipe format to show if pipe-pane is active, GitHub issue 990. --- usr.bin/tmux/format.c | 3 ++- 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 32abfb54a64..234acff6215 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.142 2017/05/31 17:56:48 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.143 2017/07/07 14:39:45 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -1393,6 +1393,7 @@ format_defaults_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_input_off", "%d", !!(wp->flags & PANE_INPUTOFF)); + format_add(ft, "pane_pipe", "%d", wp->pipe_fd != -1); status = wp->status; if (wp->fd == -1 && WIFEXITED(status)) diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 62ed321055e..2bbac3f7564 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.566 2017/07/04 22:21:31 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.567 2017/07/07 14:39:45 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott .\" @@ -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: July 4 2017 $ +.Dd $Mdocdate: July 7 2017 $ .Dt TMUX 1 .Os .Sh NAME @@ -3596,6 +3596,7 @@ The following variables are available, where appropriate: .It Li "pane_left" Ta "" Ta "Left of pane" .It Li "pane_mode" Ta "" Ta "Name of pane mode, if any." .It Li "pane_pid" Ta "" Ta "PID of first process in pane" +.It Li "pane_pipe" Ta "" Ta "1 if pane is being piped" .It Li "pane_right" Ta "" Ta "Right of pane" .It Li "pane_search_string" Ta "" Ta "Last search string in copy mode" .It Li "pane_start_command" Ta "" Ta "Command pane started with" -- 2.20.1