summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2013-03-22 15:51:15 +0000
committernicm <nicm@openbsd.org>2013-03-22 15:51:15 +0000
commite724c6266f8e06dbbeec9a086aa2c64e4964fa3a (patch)
tree8352e8bd5c929f6194a650fee9c260d8cdb318a6
parentRemove unnecessary initializers of cmd_ctx. (diff)
downloadwireguard-openbsd-e724c6266f8e06dbbeec9a086aa2c64e4964fa3a.tar.xz
wireguard-openbsd-e724c6266f8e06dbbeec9a086aa2c64e4964fa3a.zip
Don't use a target-client for stdout, just always cmdclient.
-rw-r--r--usr.bin/tmux/cmd-capture-pane.c12
-rw-r--r--usr.bin/tmux/tmux.17
2 files changed, 6 insertions, 13 deletions
diff --git a/usr.bin/tmux/cmd-capture-pane.c b/usr.bin/tmux/cmd-capture-pane.c
index 41cc27866ff..9c9b2fa5d54 100644
--- a/usr.bin/tmux/cmd-capture-pane.c
+++ b/usr.bin/tmux/cmd-capture-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-capture-pane.c,v 1.14 2013/03/21 18:43:34 nicm Exp $ */
+/* $OpenBSD: cmd-capture-pane.c,v 1.15 2013/03/22 15:51:15 nicm Exp $ */
/*
* Copyright (c) 2009 Jonathan Alvarado <radobobo@users.sourceforge.net>
@@ -31,9 +31,8 @@ enum cmd_retval cmd_capture_pane_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_capture_pane_entry = {
"capture-pane", "capturep",
- "b:c:E:pS:t:", 0, 0,
- "[-p] [-c target-client] [-b buffer-index] [-E end-line] "
- "[-S start-line] "
+ "b:E:pS:t:", 0, 0,
+ "[-p] [-b buffer-index] [-E end-line] [-S start-line]"
CMD_TARGET_PANE_USAGE,
0,
NULL,
@@ -45,7 +44,7 @@ enum cmd_retval
cmd_capture_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
{
struct args *args = self->args;
- struct client *c;
+ struct client *c = ctx->cmdclient;
struct window_pane *wp;
char *buf, *line, *cause;
struct screen *s;
@@ -54,9 +53,6 @@ cmd_capture_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
u_int i, limit, top, bottom, tmp;
size_t len, linelen;
- if ((c = cmd_find_client(ctx, args_get(args, 'c'))) == NULL)
- return (CMD_RETURN_ERROR);
-
if (cmd_find_pane(ctx, args_get(args, 't'), NULL, &wp) == NULL)
return (CMD_RETURN_ERROR);
s = &wp->base;
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index baa73c1eaca..941b42a6dc5 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.324 2013/03/22 10:37:39 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.325 2013/03/22 15:51:15 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -1038,7 +1038,6 @@ but a different format may be specified with
.It Xo Ic capture-pane
.Op Fl p
.Op Fl b Ar buffer-index
-.Op Fl c Ar target-client
.Op Fl E Ar end-line
.Op Fl S Ar start-line
.Op Fl t Ar target-pane
@@ -1047,9 +1046,7 @@ but a different format may be specified with
Capture the contents of a pane.
If
.Fl p
-is given, the output goes to
-.Ar target-client
-stdout, otherwise to the buffer specified with
+is given, the output goes to stdout, otherwise to the buffer specified with
.Fl b
or a new buffer if omitted.
.Pp