summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/tmux/cmd-select-pane.c11
-rw-r--r--usr.bin/tmux/tmux.126
2 files changed, 24 insertions, 13 deletions
diff --git a/usr.bin/tmux/cmd-select-pane.c b/usr.bin/tmux/cmd-select-pane.c
index 9e76625bf0c..f3039b1a0fd 100644
--- a/usr.bin/tmux/cmd-select-pane.c
+++ b/usr.bin/tmux/cmd-select-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-select-pane.c,v 1.40 2017/08/30 10:33:57 nicm Exp $ */
+/* $OpenBSD: cmd-select-pane.c,v 1.41 2017/09/02 17:51:54 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -30,8 +30,8 @@ const struct cmd_entry cmd_select_pane_entry = {
.name = "select-pane",
.alias = "selectp",
- .args = { "DdegLlMmP:Rt:U", 0, 0 },
- .usage = "[-DdegLlMmRU] [-P style] " CMD_TARGET_PANE_USAGE,
+ .args = { "DdegLlMmP:RT:t:U", 0, 0 },
+ .usage = "[-DdegLlMmRU] [-P style] [-T title] " CMD_TARGET_PANE_USAGE,
.target = { 't', CMD_FIND_PANE, 0 },
@@ -147,6 +147,11 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
return (CMD_RETURN_NORMAL);
}
+ if (args_has(self->args, 'T')) {
+ screen_set_title(&wp->base, args_get(self->args, 'T'));
+ server_status_window(wp->window);
+ }
+
if (wp == w->active)
return (CMD_RETURN_NORMAL);
server_unzoom_window(wp->window);
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index 15d3c3eabbe..7aff17356f2 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.576 2017/08/23 09:39:11 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.577 2017/09/02 17:51:54 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: August 23 2017 $
+.Dd $Mdocdate: September 2 2017 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -1923,6 +1923,7 @@ applies the last set layout if possible (undoes the most recent layout change).
.It Xo Ic select-pane
.Op Fl DdegLlMmRU
.Op Fl P Ar style
+.Op Fl T Ar title
.Op Fl t Ar target-pane
.Xc
.D1 (alias: Ic selectp )
@@ -1978,6 +1979,9 @@ select-pane -t:.1 -P 'bg=red'
.Pp
.Fl g
shows the current pane style.
+.Pp
+.Fl T
+sets the pane title.
.It Xo Ic select-window
.Op Fl lnpT
.Op Fl t Ar target-window
@@ -2874,7 +2878,7 @@ Set the position of the status line.
Display
.Ar string
to the right of the status line.
-By default, the current window title in double quotes, the date and the time
+By default, the current pane title in double quotes, the date and the time
are shown.
As with
.Ic status-left ,
@@ -3722,14 +3726,11 @@ and are displayed in the status line and various lists: the name is the
.Nm
identifier for a window or session.
Only panes have titles.
-A pane's title is typically set by the program running inside the pane and
-is not modified by
-.Nm .
-It is the same mechanism used to set for example the
+A pane's title is typically set by the program running inside the pane using
+an escape sequence (like it would set the
.Xr xterm 1
-window title in an
-.Xr X 7
-window manager.
+window title in
+.Xr X 7 Ns ).
Windows themselves do not have titles - a window's title is the title of its
active pane.
.Nm
@@ -3770,6 +3771,11 @@ A pane's title can be set via the OSC title setting sequence, for example:
.Bd -literal -offset indent
$ printf '\e033]2;My Title\e033\e\e'
.Ed
+.Pp
+It can also be modified with the
+.Ic select-pane
+.Fl T
+command.
.Sh ENVIRONMENT
When the server is started,
.Nm