aboutsummaryrefslogtreecommitdiff
path: root/tmux.1
diff options
context:
space:
mode:
Diffstat (limited to 'tmux.1')
-rw-r--r--tmux.1202
1 files changed, 127 insertions, 75 deletions
diff --git a/tmux.1 b/tmux.1
index 227ed36b..a9e82f87 100644
--- a/tmux.1
+++ b/tmux.1
@@ -296,6 +296,12 @@ Prompt to search for text in open windows.
Display some information about the current window.
.It l
Move to the previously selected window.
+.It m
+Mark the current pane (see
+.Ic select-pane
+.Fl m ) .
+.It M
+Clear the marked pane.
.It n
Change to the next window.
.It o
@@ -306,12 +312,6 @@ Change to the previous window.
Briefly display pane indexes.
.It r
Force redraw of the attached client.
-.It m
-Mark the current pane (see
-.Ic select-pane
-.Fl m ) .
-.It M
-Clear the marked pane.
.It s
Select a new session for the attached client interactively.
.It t
@@ -1156,7 +1156,7 @@ The
.Fl P
option prints information about the new session after it has been created.
By default, it uses the format
-.Ql #{session_name}:
+.Ql #{session_name}:\&
but a different format may be specified with
.Fl F .
.Pp
@@ -1296,7 +1296,7 @@ Suspend a client by sending
.Dv SIGTSTP
(tty stop).
.It Xo Ic switch-client
-.Op Fl Elnpr
+.Op Fl ElnprZ
.Op Fl c Ar target-client
.Op Fl t Ar target-session
.Op Fl T Ar key-table
@@ -1313,7 +1313,10 @@ may refer to a pane (a target that contains
.Ql \&.
or
.Ql % ) ,
-in which case the session, window and pane are all changed.
+to change session, window and pane.
+In that case,
+.Fl Z
+keeps the window zoomed if it was zoomed.
If
.Fl l ,
.Fl n
@@ -1349,11 +1352,41 @@ bind-key -Troot a switch-client -Ttable1
.Ed
.El
.Sh WINDOWS AND PANES
-A
+Each window displayed by
+.Nm
+may be split into one or more
+.Em panes ;
+each pane takes up a certain area of the display and is a separate terminal.
+A window may be split into panes using the
+.Ic split-window
+command.
+Windows may be split horizontally (with the
+.Fl h
+flag) or vertically.
+Panes may be resized with the
+.Ic resize-pane
+command (bound to
+.Ql C-Up ,
+.Ql C-Down
+.Ql C-Left
+and
+.Ql C-Right
+by default), the current pane may be changed with the
+.Ic select-pane
+command and the
+.Ic rotate-window
+and
+.Ic swap-pane
+commands may be used to swap panes without changing their position.
+Panes are numbered beginning from zero in the order they are created.
+.Pp
+By default, a
.Nm
-window may be in one of two modes.
-The default permits direct access to the terminal attached to the window.
-The other is copy mode, which permits a section of a window or its
+pane permits direct access to the terminal contained in the pane.
+A pane may also be put into one of several modes:
+.Bl -dash -offset indent
+.It
+Copy mode, which permits a section of a window or its
history to be copied to a
.Em paste buffer
for later insertion into another window.
@@ -1362,9 +1395,21 @@ This mode is entered with the
command, bound to
.Ql \&[
by default.
-It is also entered when a command that produces output, such as
+.It
+View mode, which is like copy mode but is entered when a command that produces
+output, such as
.Ic list-keys ,
is executed from a key binding.
+.It
+Choose mode, which allows an item to be chosen from a list.
+This may be a client, a session or window or pane, or a buffer.
+This mode is entered with the
+.Ic choose-buffer ,
+.Ic choose-client
+and
+.Ic choose-tree
+commands.
+.El
.Pp
In copy mode an indicator is displayed in the top-right corner of the pane with
the current position and the number of lines in the history.
@@ -1405,6 +1450,7 @@ The following commands are supported in copy mode:
.It Li "copy-selection-no-clear [<prefix>]" Ta "" Ta ""
.It Li "copy-selection-and-cancel [<prefix>]" Ta "Enter" Ta "M-w"
.It Li "cursor-down" Ta "j" Ta "Down"
+.It Li "cursor-down-and-cancel" Ta "" Ta ""
.It Li "cursor-left" Ta "h" Ta "Left"
.It Li "cursor-right" Ta "l" Ta "Right"
.It Li "cursor-up" Ta "k" Ta "Up"
@@ -1526,37 +1572,7 @@ bind PageUp copy-mode -eu
.Ed
.El
.Pp
-Each window displayed by
-.Nm
-may be split into one or more
-.Em panes ;
-each pane takes up a certain area of the display and is a separate terminal.
-A window may be split into panes using the
-.Ic split-window
-command.
-Windows may be split horizontally (with the
-.Fl h
-flag) or vertically.
-Panes may be resized with the
-.Ic resize-pane
-command (bound to
-.Ql C-Up ,
-.Ql C-Down
-.Ql C-Left
-and
-.Ql C-Right
-by default), the current pane may be changed with the
-.Ic select-pane
-command and the
-.Ic rotate-window
-and
-.Ic swap-pane
-commands may be used to swap panes without changing their position.
-Panes are numbered beginning from zero in the order they are created.
-.Pp
-A number of preset
-.Em layouts
-are available.
+A number of preset arrangements of panes are available, these are called layouts.
These may be selected with the
.Ic select-layout
command or cycled with
@@ -1635,7 +1651,7 @@ By default, it uses the format
but a different format may be specified with
.Fl F .
.It Xo Ic capture-pane
-.Op Fl aepPqCJ
+.Op Fl aepPqCJN
.Op Fl b Ar buffer-name
.Op Fl E Ar end-line
.Op Fl S Ar start-line
@@ -1660,8 +1676,10 @@ is given, the output includes escape sequences for text and background
attributes.
.Fl C
also escapes non-printable characters as octal \exxx.
+.Fl N
+preserves trailing spaces at each line's end and
.Fl J
-joins wrapped lines and preserves trailing spaces at each line's end.
+preserves trailing spaces and joins any wrapped lines.
.Fl P
captures only any output that the pane has received that is the beginning of an
as-yet incomplete escape sequence.
@@ -1680,7 +1698,7 @@ the end of the visible pane.
The default is to capture only the visible contents of the pane.
.It Xo
.Ic choose-client
-.Op Fl NZ
+.Op Fl NrZ
.Op Fl F Ar format
.Op Fl f Ar filter
.Op Fl O Ar sort-order
@@ -1709,7 +1727,8 @@ The following keys may be used in client mode:
.It Li "z" Ta "Suspend selected client"
.It Li "Z" Ta "Suspend tagged clients"
.It Li "f" Ta "Enter a format to filter items"
-.It Li "O" Ta "Change sort order"
+.It Li "O" Ta "Change sort field"
+.It Li "r" Ta "Reverse sort order"
.It Li "v" Ta "Toggle preview"
.It Li "q" Ta "Exit mode"
.El
@@ -1724,12 +1743,14 @@ If
is not given, "detach-client -t '%%'" is used.
.Pp
.Fl O
-specifies the initial sort order: one of
+specifies the initial sort field: one of
.Ql name ,
.Ql size ,
.Ql creation ,
or
.Ql activity .
+.Fl r
+reverses the sort order.
.Fl f
specifies an initial filter: the filter is a format - if it evaluates to zero,
the item in the list is not shown, otherwise it is shown.
@@ -1741,7 +1762,7 @@ starts without the preview.
This command works only if at least one client is attached.
.It Xo
.Ic choose-tree
-.Op Fl GNswZ
+.Op Fl GNrswZ
.Op Fl F Ar format
.Op Fl f Ar filter
.Op Fl O Ar sort-order
@@ -1773,7 +1794,8 @@ The following keys may be used in tree mode:
.It Li "C-t" Ta "Tag all items"
.It Li "\&:" Ta "Run a command for each tagged item"
.It Li "f" Ta "Enter a format to filter items"
-.It Li "O" Ta "Change sort order"
+.It Li "O" Ta "Change sort field"
+.It Li "r" Ta "Reverse sort order"
.It Li "v" Ta "Toggle preview"
.It Li "q" Ta "Exit mode"
.El
@@ -1788,11 +1810,13 @@ If
is not given, "switch-client -t '%%'" is used.
.Pp
.Fl O
-specifies the initial sort order: one of
+specifies the initial sort field: one of
.Ql index ,
.Ql name ,
or
.Ql time .
+.Fl r
+reverses the sort order.
.Fl f
specifies an initial filter: the filter is a format - if it evaluates to zero,
the item in the list is not shown, otherwise it is shown.
@@ -1925,11 +1949,13 @@ The
option kills all but the window given with
.Fl t .
.It Xo Ic last-pane
-.Op Fl de
+.Op Fl deZ
.Op Fl t Ar target-window
.Xc
.D1 (alias: Ic lastp )
Select the last (previously selected) pane.
+.Fl Z
+keeps the window zoomed if it was zoomed.
.Fl e
enables or
.Fl d
@@ -2311,7 +2337,7 @@ option has the same meaning as for the
.Ic new-window
command.
.It Xo Ic rotate-window
-.Op Fl DU
+.Op Fl DUZ
.Op Fl t Ar target-window
.Xc
.D1 (alias: Ic rotatew )
@@ -2319,6 +2345,8 @@ Rotate the positions of the panes within a window, either upward (numerically
lower) with
.Fl U
or downward (numerically higher).
+.Fl Z
+keeps the window zoomed if it was zoomed.
.It Xo Ic select-layout
.Op Fl Enop
.Op Fl t Ar target-pane
@@ -2342,7 +2370,7 @@ applies the last set layout if possible (undoes the most recent layout change).
.Fl E
spreads the current pane and any panes next to it out evenly.
.It Xo Ic select-pane
-.Op Fl DdeLlMmRU
+.Op Fl DdeLlMmRUZ
.Op Fl T Ar title
.Op Fl t Ar target-pane
.Xc
@@ -2359,6 +2387,8 @@ or
.Fl U
is used, respectively the pane below, to the left, to the right, or above the
target pane is used.
+.Fl Z
+keeps the window zoomed if it was zoomed.
.Fl l
is the same as using the
.Ic last-pane
@@ -2464,7 +2494,7 @@ All other options have the same meaning as for the
.Ic new-window
command.
.It Xo Ic swap-pane
-.Op Fl dDU
+.Op Fl dDUZ
.Op Fl s Ar src-pane
.Op Fl t Ar dst-pane
.Xc
@@ -2481,7 +2511,9 @@ swaps with the next pane (after it numerically).
.Fl d
instructs
.Nm
-not to change the active pane.
+not to change the active pane and
+.Fl Z
+keeps the window zoomed if it was zoomed.
.Pp
If
.Fl s
@@ -2716,7 +2748,7 @@ and
.Pp
The
.Nm
-server has a set of global options which do not apply to any particular
+server has a set of global server options which do not apply to any particular
window or session or pane.
These are altered with the
.Ic set-option
@@ -4060,7 +4092,7 @@ will append
if the pane title is more than five characters.
.Pp
Prefixing a time variable with
-.Ql t:
+.Ql t:\&
will convert it to a string, so if
.Ql #{window_activity}
gives
@@ -4069,34 +4101,34 @@ gives
gives
.Ql Sun Oct 25 09:25:02 2015 .
The
-.Ql b:
+.Ql b:\&
and
-.Ql d:
+.Ql d:\&
prefixes are
.Xr basename 3
and
.Xr dirname 3
of the variable respectively.
-.Ql q:
+.Ql q:\&
will escape
.Xr sh 1
special characters.
-.Ql E:
+.Ql E:\&
will expand the format twice, for example
.Ql #{E:status-left}
is the result of expanding the content of the
.Ic status-left
option rather than the option itself.
-.Ql T:
+.Ql T:\&
is like
-.Ql E:
+.Ql E:\&
but also expands
.Xr strftime 3
specifiers.
-.Ql S: ,
-.Ql W:
+.Ql S:\& ,
+.Ql W:\&
or
-.Ql P:
+.Ql P:\&
will loop over each session, window or pane and insert the format once
for each.
For windows and panes, two comma-separated formats may be given:
@@ -4107,7 +4139,7 @@ For example, to get a list of windows formatted like the status line:
.Ed
.Pp
A prefix of the form
-.Ql s/foo/bar/:
+.Ql s/foo/bar/:\&
will substitute
.Ql foo
with
@@ -4116,7 +4148,7 @@ throughout.
The first argument may be an extended regular expression and a final argument may be
.Ql i
to ignore case, for example
-.Ql s/a(.)/\e1x/i:
+.Ql s/a(.)/\e1x/i:\&
would change
.Ql abABab
into
@@ -4280,6 +4312,7 @@ The following variables are available, where appropriate:
.It Li "window_last_flag" Ta "" Ta "1 if window is the last used"
.It Li "window_layout" Ta "" Ta "Window layout description, ignoring zoomed window panes"
.It Li "window_linked" Ta "" Ta "1 if window is linked across sessions"
+.It Li "window_marked_flag" Ta "" Ta "1 if window contains the marked pane"
.It Li "window_name" Ta "#W" Ta "Name of window"
.It Li "window_offset_x" Ta "" Ta "X offset into window if larger than client"
.It Li "window_offset_y" Ta "" Ta "Y offset into window if larger than client"
@@ -4307,7 +4340,9 @@ and
.Pp
A style may be the single term
.Ql default
-to specify the default style (which may inherit from another option) or a space
+to specify the default style (which may come from an option, for example
+.Ic status-style
+in the status line) or a space
or comma separated list of the following:
.Bl -tag -width Ds
.It Ic fg=colour
@@ -4386,6 +4421,20 @@ and
.Ic list=right-marker
mark the text to be used to mark that text has been trimmed from the left or
right of the list if there is not enough space.
+.It Xo Ic push-default ,
+.Ic pop-default
+.Xc
+Store the current colours and attributes as the default or reset to the previous
+default.
+A
+.Ic push-default
+affects any subsequent use of the
+.Ic default
+term until a
+.Ic pop-default .
+Only one default may be pushed (each
+.Ic push-default
+replaces the previous saved default).
.It Xo Ic range=left ,
.Ic range=right ,
.Ic range=window|X ,
@@ -4842,7 +4891,7 @@ The buffer commands are as follows:
.Bl -tag -width Ds
.It Xo
.Ic choose-buffer
-.Op Fl NZ
+.Op Fl NZr
.Op Fl F Ar format
.Op Fl f Ar filter
.Op Fl O Ar sort-order
@@ -4869,7 +4918,8 @@ The following keys may be used in buffer mode:
.It Li "d" Ta "Delete selected buffer"
.It Li "D" Ta "Delete tagged buffers"
.It Li "f" Ta "Enter a format to filter items"
-.It Li "O" Ta "Change sort order"
+.It Li "O" Ta "Change sort field"
+.It Li "r" Ta "Reverse sort order"
.It Li "v" Ta "Toggle preview"
.It Li "q" Ta "Exit mode"
.El
@@ -4884,11 +4934,13 @@ If
is not given, "paste-buffer -b '%%'" is used.
.Pp
.Fl O
-specifies the initial sort order: one of
+specifies the initial sort field: one of
.Ql time ,
.Ql name
or
.Ql size .
+.Fl r
+reverses the sort order.
.Fl f
specifies an initial filter: the filter is a format - if it evaluates to zero,
the item in the list is not shown, otherwise it is shown.