summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-04-17 14:39:37 +0000
committernicm <nicm@openbsd.org>2019-04-17 14:39:37 +0000
commita384e55be23bdba7ec94f13d0f10feed48e7f4c4 (patch)
tree79f00f624bc641fea78044aefdd7ecf0a99f64a7
parentBreak new window and pane creation common code from various commands and (diff)
downloadwireguard-openbsd-a384e55be23bdba7ec94f13d0f10feed48e7f4c4.tar.xz
wireguard-openbsd-a384e55be23bdba7ec94f13d0f10feed48e7f4c4.zip
Document that switch-client can change all of session,window,pane and
check for % in the target as well as ":.".
-rw-r--r--usr.bin/tmux/cmd-switch-client.c4
-rw-r--r--usr.bin/tmux/tmux.112
2 files changed, 12 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-switch-client.c b/usr.bin/tmux/cmd-switch-client.c
index ee233720b3c..0978129cc54 100644
--- a/usr.bin/tmux/cmd-switch-client.c
+++ b/usr.bin/tmux/cmd-switch-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-switch-client.c,v 1.56 2019/04/17 14:37:48 nicm Exp $ */
+/* $OpenBSD: cmd-switch-client.c,v 1.57 2019/04/17 14:39:37 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -61,7 +61,7 @@ cmd_switch_client_exec(struct cmd *self, struct cmdq_item *item)
if ((c = cmd_find_client(item, args_get(args, 'c'), 0)) == NULL)
return (CMD_RETURN_ERROR);
- if (tflag != NULL && tflag[strcspn(tflag, ":.")] != '\0') {
+ if (tflag != NULL && tflag[strcspn(tflag, ":.%")] != '\0') {
type = CMD_FIND_PANE;
flags = 0;
} else {
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index 3b550def3ac..d5480a7660f 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.634 2019/04/08 17:55:51 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.635 2019/04/17 14:39:37 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
.\"
@@ -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: April 8 2019 $
+.Dd $Mdocdate: April 17 2019 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -1053,6 +1053,14 @@ Switch the current session for client
.Ar target-client
to
.Ar target-session .
+As a special case,
+.Fl t
+may refer to a pane (a target that contains
+.Ql : ,
+.Ql .
+or
+.Ql % )
+in which case the session, window and pane are all changed.
If
.Fl l ,
.Fl n