3 .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
14 .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
15 .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 .Nd terminal multiplexer
27 .Op Fl c Ar shell-command
29 .Op Fl L Ar socket-name
30 .Op Fl S Ar socket-path
31 .Op Ar command Op Ar flags
35 is a terminal multiplexer:
36 it enables a number of terminals to be created, accessed, and
37 controlled from a single screen.
39 may be detached from a screen
40 and continue running in the background,
41 then later reattached.
45 is started it creates a new
49 and displays it on screen.
50 A status line at the bottom of the screen
51 shows information on the current session
52 and is used to enter interactive commands.
54 A session is a single collection of
56 under the management of
58 Each session has one or more
60 A window occupies the entire screen
61 and may be split into rectangular panes,
62 each of which is a separate pseudo terminal
65 manual page documents the technical details of pseudo terminals).
68 instances may connect to the same session,
69 and any number of windows may be present in the same session.
70 Once all sessions are killed,
74 Each session is persistent and will survive accidental disconnection
77 connection timeout) or intentional detaching (with the
81 may be reattached using:
87 a session is displayed on screen by a
89 and all sessions are managed by a single
91 The server and each client are separate processes which communicate through a
95 The options are as follows:
96 .Bl -tag -width "XXXXXXXXXXXX"
100 to assume the terminal supports 256 colours.
104 but indicates that the terminal supports 88 colours.
105 .It Fl c Ar shell-command
108 using the default shell.
111 server will be started to retrieve the
114 This option is for compatibility with
118 is used as a login shell.
120 Specify an alternative configuration file.
123 loads the system configuration file from
125 if present, then looks for a user configuration file at
127 The configuration file is a set of
129 commands which are executed in sequence when the server is first started.
131 If a command in the configuration file fails,
133 will report an error and exit without executing further commands.
134 .It Fl L Ar socket-name
136 stores the server socket in a directory under
138 the default socket is named
140 This option allows a different socket name to be specified, allowing several
146 a full path is not necessary: the sockets are all created in the same
149 If the socket is accidentally removed, the
151 signal may be sent to the
153 server process to recreate it.
155 Behave as a login shell.
156 This flag currently has no effect and is for compatibility with other shells
157 when using tmux as a login shell.
161 server option to prevent the server sending various informational messages.
162 .It Fl S Ar socket-path
163 Specify a full alternative path to the server socket.
166 is specified, the default socket directory is not used and any
171 attempts to guess if the terminal is likely to support UTF-8 by checking the
177 environment variables to be set for the string "UTF-8".
178 This is not always correct: the
180 flag explicitly informs
182 that UTF-8 is supported.
184 If the server is started from a client passed
186 or where UTF-8 is detected, the
190 options are enabled in the global window and session options respectively.
192 Request verbose logging.
193 This option may be specified multiple times for increasing verbosity.
194 Log messages will be saved into
195 .Pa tmux-client-PID.log
197 .Pa tmux-server-PID.log
198 files in the current directory, where
200 is the PID of the server or client process.
201 .It Ar command Op Ar flags
202 This specifies one of a set of commands used to control
204 as described in the following sections.
205 If no commands are specified, the
211 may be controlled from an attached client by using a key combination of a
214 (Ctrl-b) by default, followed by a command key.
216 The default command key bindings are:
218 .Bl -tag -width "XXXXXXXXXX" -offset indent -compact
220 Send the prefix key (C-b) through to the application.
222 Rotate the panes in the current window forwards.
228 Break the current pane out of the window.
230 Split the current pane into two, top and bottom.
232 List all paste buffers.
234 Split the current pane into two, left and right.
236 Kill the current window.
238 Prompt for a window index to select.
240 Rename the current window.
242 Delete the most recently copied buffer of text.
244 Prompt for an index to move the current window.
246 Select windows 0 to 9.
252 Choose which buffer to paste interactively from a list.
254 List all key bindings.
256 Choose a client to detach.
258 Enter copy mode to copy text or view the history.
260 Paste the most recently copied buffer of text.
264 Detach the current client.
266 Prompt to search for text in open windows.
268 Display some information about the current window.
270 Move to the previously selected window.
272 Change to the next window.
274 Select the next pane in the current window.
276 Change to the previous window.
278 Briefly display pane indexes.
280 Force redraw of the attached client.
282 Select a new session for the attached client interactively.
286 Choose the current window interactively.
288 Kill the current pane.
290 Swap the current pane with the previous pane.
292 Swap the current pane with the next pane.
294 Show previous messages from
298 Enter copy mode and scroll one page up.
301 Change to the pane above, below, to the left, or to the right of the current
304 Arrange panes in one of the five preset layouts: even-horizontal,
305 even-vertical, main-horizontal, main-vertical, or tiled.
307 Move to the next window with a bell or activity marker.
309 Rotate the panes in the current window backwards.
311 Move to the previous window with a bell or activity marker.
314 Resize the current pane in steps of one cell.
317 Resize the current pane in steps of five cells.
320 Key bindings may be changed with the
326 This section contains a list of the commands supported by
328 Most commands accept the optional
336 These specify the client, session, window or pane which a command should affect.
340 file to which the client is connected, for example either of
344 for the client attached to
346 If no client is specified, the current client is chosen, if possible, or an
348 Clients may be listed with the
353 is either the name of a session (as listed by the
355 command) or the name of a client with the same syntax as
357 in which case the session attached to the client is used.
358 When looking for the session name,
360 initially searches for an exact match; if none is found, the session names
361 are checked for any for which
363 is a prefix or for which it matches as an
366 If a single match is found, it is used as the target session; multiple matches
368 If a session is omitted, the current session is used if available; if no
369 current session is available, the most recently used is chosen.
372 specifies a window in the form
373 .Em session Ns \&: Ns Em window .
375 follows the same rules as for
379 is looked for in order: as a window index, for example mysession:1; as an exact
380 window name, such as mysession:mywindow; then as an
382 pattern or the start of a window name, such as mysession:mywin* or
384 An empty window name specifies the next unused index if appropriate (for
390 otherwise the current window in
393 The special character
395 uses the last (previously current) window, or
399 are the next window or the previous window by number.
400 When the argument does not contain a colon,
402 first attempts to parse it as window; if that fails, an attempt is made to
406 takes a similar form to
408 but with the optional addition of a period followed by a pane index, for
409 example: mysession:mywindow.1.
410 If the pane index is omitted, the currently active pane in the specified
412 If neither a colon nor period appears,
414 first attempts to use the argument as a pane index; if that fails, it is looked
421 indicate the next or previous pane index, respectively.
431 may be used instead of a pane index.
433 The special characters
437 may be followed by an offset, for example:
438 .Bd -literal -offset indent
442 When dealing with a session that doesn't contain sequential window indexes,
443 they will be correctly skipped.
449 These must be passed as a single item, which typically means quoting them, for
451 .Bd -literal -offset indent
452 new-window 'vi /etc/passwd'
459 command, passed with the command and arguments separately, for example:
460 .Bd -literal -offset indent
461 bind-key F1 set-window-option force-width 81
466 .Bd -literal -offset indent
467 $ tmux bind-key F1 set-window-option force-width 81
470 Multiple commands may be specified together as part of a
471 .Em command sequence .
472 Each command should be separated by spaces and a semicolon;
473 commands are executed sequentially from left to right.
474 A literal semicolon may be included by escaping it with a backslash (for
475 example, when specifying a command sequence to
481 .Bd -literal -offset indent
482 refresh-client -t/dev/ttyp2
484 rename-session -tfirst newname
486 set-window-option -t:0 monitor-activity on
488 new-window ; split-window -d
493 .Bd -literal -offset indent
494 $ tmux kill-window -t :1
496 $ tmux new-window \e; split-window -d
498 $ tmux new-session -d 'vi /etc/passwd' \e; split-window -d \e; attach
500 .Sh CLIENTS AND SESSIONS
503 server manages clients, sessions, windows and panes.
504 Clients are attached to sessions to interact with them, either
505 when they are created with the
507 command, or later with the
510 Each session has one of more windows
513 Windows may be linked to multiple sessions and are made up of one or
515 each of which contains a pseudo terminal.
516 Commands for creating, linking and otherwise manipulating windows
519 .Sx WINDOWS AND PANES
522 The following commands are available to manage clients and sessions:
524 .It Xo Ic attach-session
526 .Op Fl t Ar target-session
528 .D1 (alias: Ic attach )
531 create a new client in the current terminal and attach it to
533 If used from inside, switch the current client.
536 is specified, any other clients attached to the session are detached.
538 signifies the client is read-only (only keys bound to the
540 command have any effect)
542 If no server is started,
544 will attempt to start it; this will fail unless sessions are created in the
546 .It Ic detach-client Op Fl t Ar target-client
547 .D1 (alias: Ic detach )
548 Detach the current client if bound to a key, or the specified client with
550 .It Ic has-session Op Fl t Ar target-session
552 Report an error and exit with 1 if the specified session does not exist.
553 If it does exist, exit with 0.
557 server and clients and destroy all sessions.
558 .It Ic kill-session Op Fl t Ar target-session
559 Destroy the given session, closing any windows linked to it and no other
560 sessions, and detaching all clients attached to it.
563 List all clients attached to the server.
565 .D1 (alias: Ic lscm )
566 List the syntax of all commands supported by
570 List all sessions managed by the server.
571 .It Ic lock-client Op Fl t Ar target-client
572 .D1 (alias: Ic lockc )
578 .It Ic lock-session Op Fl t Ar target-session
579 .D1 (alias: Ic locks )
580 Lock all clients attached to
582 .It Xo Ic new-session
584 .Op Fl n Ar window-name
585 .Op Fl s Ar session-name
586 .Op Fl t Ar target-session
590 Create a new session with name
593 The new session is attached to the current terminal unless
599 are the name of and shell command to execute in the initial window.
601 If run from a terminal, any
603 special characters are saved and used for new windows in the new session.
607 is given, the new session is
611 This means they share the same set of windows - all windows from
613 are linked to the new session and any subsequent new windows or windows being
614 closed are applied to both sessions.
615 The current and previous window and any session options remain independent and
616 either session may be killed without affecting the other.
624 .It Ic refresh-client Op Fl t Ar target-client
625 .D1 (alias: Ic refresh )
626 Refresh the current client if bound to a key, or a single client if one is given
629 .It Xo Ic rename-session
630 .Op Fl t Ar target-session
633 .D1 (alias: Ic rename )
634 Rename the session to
636 .It Xo Ic show-messages
637 .Op Fl t Ar target-client
639 .D1 (alias: Ic showmsgs )
640 Any messages displayed on the status line are saved in a per-client message
641 log, up to a maximum of the limit set by the
643 session option for the session attached to that client.
644 This command displays the log for
646 .It Ic source-file Ar path
647 .D1 (alias: Ic source )
648 Execute commands from
651 .D1 (alias: Ic start )
654 server, if not already running, without creating any sessions.
655 .It Xo Ic suspend-client
656 .Op Fl c Ar target-client
658 .D1 (alias: Ic suspendc )
659 Suspend a client by sending
662 .It Xo Ic switch-client
664 .Op Fl c Ar target-client
665 .Op Fl t Ar target-session
667 .D1 (alias: Ic switchc )
668 Switch the current session for client
676 is used, the client is moved to the next or previous session respectively.
678 .Sh WINDOWS AND PANES
681 window may be in one of several modes.
682 The default permits direct access to the terminal attached to the window.
683 The other is copy mode, which permits a section of a window or its
684 history to be copied to a
686 for later insertion into another window.
687 This mode is entered with the
692 It is also entered when a command that produces output, such as
694 is executed from a key binding.
696 The keys available depend on whether emacs or vi mode is selected
700 The following keys are supported as appropriate for the mode:
701 .Bl -column "FunctionXXXXXXXXXXXXXXXXX" "viXXXXXXXXXX" "emacs" -offset indent
702 .It Sy "Function" Ta Sy "vi" Ta Sy "emacs"
703 .It Li "Back to indentation" Ta "^" Ta "M-m"
704 .It Li "Bottom of history" Ta "G" Ta "M-<"
705 .It Li "Clear selection" Ta "Escape" Ta "C-g"
706 .It Li "Copy selection" Ta "Enter" Ta "M-w"
707 .It Li "Cursor down" Ta "j" Ta "Down"
708 .It Li "Cursor left" Ta "h" Ta "Left"
709 .It Li "Cursor right" Ta "l" Ta "Right"
710 .It Li "Cursor to bottom line" Ta "L" Ta ""
711 .It Li "Cursor to middle line" Ta "M" Ta "M-r"
712 .It Li "Cursor to top line" Ta "H" Ta "M-R"
713 .It Li "Cursor up" Ta "k" Ta "Up"
714 .It Li "Delete entire line" Ta "d" Ta "C-u"
715 .It Li "Delete to end of line" Ta "D" Ta "C-k"
716 .It Li "End of line" Ta "$" Ta "C-e"
717 .It Li "Go to line" Ta ":" Ta "g"
718 .It Li "Half page down" Ta "C-d" Ta "M-Down"
719 .It Li "Half page up" Ta "C-u" Ta "M-Up"
720 .It Li "Jump forward" Ta "f" Ta "f"
721 .It Li "Jump backward" Ta "F" Ta "F"
722 .It Li "Jump again" Ta ";" Ta ";"
723 .It Li "Jump again in reverse" Ta "," Ta ","
724 .It Li "Next page" Ta "C-f" Ta "Page down"
725 .It Li "Next space" Ta "W" Ta ""
726 .It Li "Next space, end of word" Ta "E" Ta ""
727 .It Li "Next word" Ta "w" Ta ""
728 .It Li "Next word end" Ta "e" Ta "M-f"
729 .It Li "Paste buffer" Ta "p" Ta "C-y"
730 .It Li "Previous page" Ta "C-b" Ta "Page up"
731 .It Li "Previous word" Ta "b" Ta "M-b"
732 .It Li "Previous space" Ta "B" Ta ""
733 .It Li "Quit mode" Ta "q" Ta "Escape"
734 .It Li "Rectangle toggle" Ta "v" Ta "R"
735 .It Li "Scroll down" Ta "C-Down or C-e" Ta "C-Down"
736 .It Li "Scroll up" Ta "C-Up or C-y" Ta "C-Up"
737 .It Li "Search again" Ta "n" Ta "n"
738 .It Li "Search again in reverse" Ta "N" Ta "N"
739 .It Li "Search backward" Ta "?" Ta "C-r"
740 .It Li "Search forward" Ta "/" Ta "C-s"
741 .It Li "Start of line" Ta "0" Ta "C-a"
742 .It Li "Start selection" Ta "Space" Ta "C-Space"
743 .It Li "Top of history" Ta "g" Ta "M->"
744 .It Li "Transpose chars" Ta "" Ta "C-t"
747 The next and previous word keys use space and the
752 characters as word delimiters by default, but this can be adjusted by
756 Next word moves to the start of the next word, next word end to the end of the
757 next word and previous word to the start of the previous word.
758 The three next and previous space keys work similarly but use a space alone as
761 The jump commands enable quick movement within a line.
766 will move the cursor to the next
768 character on the current line.
771 will then jump to the next occurrence.
773 Commands in copy mode may be prefaced by an optional repeat count.
774 With vi key bindings, a prefix is entered using the number keys; with
775 emacs, the Alt (meta) key and a number begins prefix entry.
776 For example, to move the cursor forward by ten words, use
782 Mode key bindings are defined in a set of named tables:
786 for keys used when line editing at the command prompt;
790 for keys used when choosing from lists (such as produced by the
797 The tables may be viewed with the
799 command and keys modified or removed with
804 The paste buffer key pastes the first line from the top paste buffer on the
813 .Op Fl t Ar target-pane
818 option scrolls one page up.
821 Each window displayed by
823 may be split into one or more
825 each pane takes up a certain area of the display and is a separate terminal.
826 A window may be split into panes using the
829 Windows may be split horizontally (with the
832 Panes may be resized with the
840 by default), the current pane may be changed with the
846 commands may be used to swap panes without changing their position.
847 Panes are numbered beginning from zero in the order they are created.
852 These may be selected with the
854 command or cycled with
858 by default); once a layout is chosen, panes within it may be moved and resized
861 The following layouts are supported:
863 .It Ic even-horizontal
864 Panes are spread out evenly from left to right across the window.
866 Panes are spread evenly from top to bottom.
867 .It Ic main-horizontal
868 A large (main) pane is shown at the top of the window and the remaining panes
869 are spread from left to right in the leftover space at the bottom.
872 window option to specify the height of the top pane.
876 but the large pane is placed on the left and the others spread from top to
877 bottom along the right.
882 Panes are spread out as evenly as possible over the window in both rows and
888 may be used to apply a previously used layout - the
890 command displays the layout of each window in a form suitable for use with
893 .Bd -literal -offset indent
896 layout: bb62,159x48,0,0{79x48,0,0,79x48,80,0}
897 $ tmux select-layout bb62,159x48,0,0{79x48,0,0,79x48,80,0}
900 automatically adjusts the size of the layout for the current window size.
901 Note that a layout cannot be applied to a window with more panes than that
902 from which the layout was originally defined.
904 Commands related to windows and panes are as follows:
908 .Op Fl t Ar target-pane
910 .D1 (alias: Ic breakp )
913 off from its containing window to make it the only pane in a new window.
916 is given, the new window does not become the current window.
917 .It Xo Ic capture-pane
918 .Op Fl b Ar buffer-index
919 .Op Fl t Ar target-pane
921 .D1 (alias: Ic capturep )
922 Capture the contents of a pane to the specified buffer, or a new buffer if none
926 .Op Fl t Ar target-window
929 Put a window into client choice mode, allowing a client to be selected
930 interactively from a list.
931 After a client is chosen,
933 is replaced by the client
937 and the result executed as a command.
940 is not given, "detach-client -t '%%'" is used.
941 This command works only from inside
945 .Op Fl t Ar target-window
948 Put a window into session choice mode, where a session may be selected
949 interactively from a list.
952 is replaced by the session name in
954 and the result executed as a command.
957 is not given, "switch-client -t '%%'" is used.
958 This command works only from inside
962 .Op Fl t Ar target-window
965 Put a window into window choice mode, where a window may be chosen
966 interactively from a list.
967 After a window is selected,
969 is replaced by the session name and window index in
971 and the result executed as a command.
974 is not given, "select-window -t '%%'" is used.
975 This command works only from inside
977 .It Ic display-panes Op Fl t Ar target-client
978 .D1 (alias: Ic displayp)
979 Display a visible indicator of each pane shown by
982 .Ic display-panes-time ,
983 .Ic display-panes-colour ,
985 .Ic display-panes-active-colour
987 While the indicator is on screen, a pane may be selected with the
992 .It Xo Ic find-window
993 .Op Fl t Ar target-window
996 .D1 (alias: Ic findw )
1001 in window names, titles, and visible content (but not history).
1002 If only one window is matched, it'll be automatically selected, otherwise a
1003 choice list is shown.
1004 This command only works from inside
1010 .Fl p Ar percentage Oc
1011 .Op Fl s Ar src-pane
1012 .Op Fl t Ar dst-pane
1014 .D1 (alias: Ic joinp )
1017 but instead of splitting
1019 and creating a new pane, split it and move
1022 This can be used to reverse
1026 .Op Fl t Ar target-pane
1028 .D1 (alias: Ic killp )
1029 Destroy the given pane.
1030 If no panes remain in the containing window, it is also destroyed.
1033 option kills all but the pane given with
1035 .It Ic kill-window Op Fl t Ar target-window
1036 .D1 (alias: Ic killw )
1037 Kill the current window or the window at
1039 removing it from any sessions to which it is linked.
1040 .It Ic last-window Op Fl t Ar target-session
1041 .D1 (alias: Ic last )
1042 Select the last (previously selected) window.
1045 is specified, select the last window of the current session.
1046 .It Xo Ic link-window
1048 .Op Fl s Ar src-window
1049 .Op Fl t Ar dst-window
1051 .D1 (alias: Ic linkw )
1058 is specified and no such window exists, the
1065 exists, it is killed, otherwise an error is generated.
1068 is given, the newly linked window is not selected.
1069 .It Ic list-panes Op Fl t Ar target-window
1070 .D1 (alias: Ic lsp )
1071 List the panes in the current window or in
1073 .It Ic list-windows Op Fl t Ar target-session
1074 .D1 (alias: Ic lsw )
1075 List windows in the current session or in
1076 .Ar target-session .
1077 .It Xo Ic move-window
1079 .Op Fl s Ar src-window
1080 .Op Fl t Ar dst-window
1082 .D1 (alias: Ic movew )
1085 except the window at
1089 .It Xo Ic new-window
1091 .Op Fl n Ar window-name
1092 .Op Fl t Ar target-window
1093 .Op Ar shell-command
1095 .D1 (alias: Ic neww )
1096 Create a new window.
1099 the new window is inserted at the next index up from the specified
1101 moving windows up if necessary,
1104 is the new window location.
1108 is given, the session does not make the new window the current window.
1110 represents the window to be created; if the target already exists an error is
1113 flag is used, in which case it is destroyed.
1115 is the command to execute.
1118 is not specified, the value of the
1122 When the shell command completes, the window closes.
1125 option to change this behaviour.
1129 environment variable must be set to
1131 for all programs running
1134 New windows will automatically have
1136 added to their environment, but care must be taken not to reset this in shell
1138 .It Ic next-layout Op Fl t Ar target-window
1139 .D1 (alias: Ic nextl )
1140 Move a window to the next layout and rearrange the panes to fit.
1141 .It Xo Ic next-window
1143 .Op Fl t Ar target-session
1145 .D1 (alias: Ic next )
1146 Move to the next window in the session.
1149 is used, move to the next window with a bell, activity or content alert.
1152 .Op Fl t Ar target-pane
1153 .Op Ar shell-command
1155 .D1 (alias: Ic pipep )
1156 Pipe any output sent by the program in
1159 A pane may only be piped to one command at a time, any existing pipe is
1165 string may contain the special character sequences supported by the
1170 is given, the current pipe (if any) is closed.
1174 option only opens a new pipe if no previous pipe exists, allowing a pipe to
1175 be toggled with a single key, for example:
1176 .Bd -literal -offset indent
1177 bind-key C-p pipe-pane -o 'cat >>~/output.#I-#P'
1179 .It Xo Ic previous-layout
1180 .Op Fl t Ar target-window
1182 .D1 (alias: Ic prevl )
1183 Move to the previous layout in the session.
1184 .It Xo Ic previous-window
1186 .Op Fl t Ar target-session
1188 .D1 (alias: Ic prev )
1189 Move to the previous window in the session.
1192 move to the previous window with a bell, activity or content alert.
1193 .It Xo Ic rename-window
1194 .Op Fl t Ar target-window
1197 .D1 (alias: Ic renamew )
1198 Rename the current window, or the window at
1202 .It Xo Ic resize-pane
1204 .Op Fl t Ar target-pane
1207 .D1 (alias: Ic resizep )
1208 Resize a pane, upward with
1210 (the default), downward with
1214 and to the right with
1218 is given in lines or cells (the default is 1).
1219 .It Xo Ic respawn-window
1221 .Op Fl t Ar target-window
1222 .Op Ar shell-command
1224 .D1 (alias: Ic respawnw )
1225 Reactivate a window in which the command has exited (see the
1230 is not given, the command used when the window was created is executed.
1231 The window must be already inactive, unless
1233 is given, in which case any existing command is killed.
1234 .It Xo Ic rotate-window
1236 .Op Fl t Ar target-window
1238 .D1 (alias: Ic rotatew )
1239 Rotate the positions of the panes within a window, either upward (numerically
1242 or downward (numerically higher).
1243 .It Xo Ic select-layout
1244 .Op Fl t Ar target-window
1247 .D1 (alias: Ic selectl )
1248 Choose a specific layout for a window.
1251 is not given, the last preset layout used (if any) is reapplied.
1252 .It Xo Ic select-pane
1254 .Op Fl t Ar target-pane
1256 .D1 (alias: Ic selectp )
1259 the active pane in window
1267 is used, respectively the pane below, to the left, to the right, or above the
1268 target pane is used.
1269 .It Ic select-window Op Fl t Ar target-window
1270 .D1 (alias: Ic selectw )
1271 Select the window at
1273 .It Xo Ic split-window
1277 .Fl p Ar percentage Oc
1278 .Op Fl t Ar target-pane
1279 .Op Ar shell-command
1281 .D1 (alias: Ic splitw )
1282 Create a new pane by splitting
1285 does a horizontal split and
1287 a vertical split; if neither is specified,
1294 options specify the size of the new pane in lines (for vertical split) or in
1295 cells (for horizontal split), or as a percentage, respectively.
1296 All other options have the same meaning as for the
1301 .Op Fl s Ar src-pane
1302 .Op Fl t Ar dst-pane
1304 .D1 (alias: Ic swapp )
1308 is used and no source pane is specified with
1311 is swapped with the previous pane (before it numerically);
1313 swaps with the next pane (after it numerically).
1317 not to change the active pane.
1318 .It Xo Ic swap-window
1320 .Op Fl s Ar src-window
1321 .Op Fl t Ar dst-window
1323 .D1 (alias: Ic swapw )
1326 except the source and destination windows are swapped.
1327 It is an error if no window exists at
1329 .It Xo Ic unlink-window
1331 .Op Fl t Ar target-window
1333 .D1 (alias: Ic unlinkw )
1338 is given, a window may be unlinked only if it is linked to multiple sessions -
1339 windows may not be linked to no sessions;
1342 is specified and the window is linked to only one session, it is unlinked and
1347 allows a command to be bound to most keys, with or without a prefix key.
1348 When specifying keys, most represent themselves (for example
1352 Ctrl keys may be prefixed with
1358 In addition, the following special key names are accepted:
1383 Note that to bind the
1387 keys, quotation marks are necessary, for example:
1388 .Bd -literal -offset indent
1389 bind-key '"' split-window
1390 bind-key "'" new-window
1393 Commands related to key bindings are as follows:
1397 .Op Fl t Ar key-table
1398 .Ar key Ar command Op Ar arguments
1400 .D1 (alias: Ic bind )
1407 the primary key bindings are modified (those normally activated with the prefix
1408 key); in this case, if
1410 is specified, it is not necessary to use the prefix key,
1417 flag indicates this key may repeat, see the
1427 the binding for command mode with
1429 or for normal mode without.
1430 To view the default bindings and possible commands, see the
1433 .It Ic list-keys Op Fl t Ar key-table
1434 .D1 (alias: Ic lsk )
1435 List all key bindings.
1438 the primary key bindings - those executed when preceded by the prefix key -
1440 Keys bound without the prefix key (see
1450 are listed; this may be one of:
1459 .Op Fl t Ar target-pane
1462 .D1 (alias: Ic send )
1463 Send a key or keys to a window.
1466 is the name of the key (such as
1470 ) to send; if the string is not recognised as a key, it is sent as a series of
1472 All arguments are sent sequentially from first to last.
1473 .It Ic send-prefix Op Fl t Ar target-pane
1474 Send the prefix key to a window as if it was pressed.
1475 If multiple prefix keys are configured, only the first is sent.
1476 .It Xo Ic unbind-key
1478 .Op Fl t Ar key-table
1481 .D1 (alias: Ic unbind )
1482 Unbind the command bound to
1486 the primary key bindings are modified; in this case, if
1488 is specified, the command bound to
1490 without a prefix (if any) is removed.
1498 is unbound: the binding for command mode with
1500 or for normal mode without.
1503 The appearance and behaviour of
1505 may be modified by changing the value of various options.
1506 There are three types of option:
1507 .Em server options ,
1510 .Em window options .
1514 server has a set of global options which do not apply to any particular
1516 These are altered with the
1519 command, or displayed with the
1524 In addition, each individual session may have a set of session options, and
1525 there is a separate set of global session options.
1526 Sessions which do not have a particular option configured inherit the value
1527 from the global session options.
1528 Session options are set or unset with the
1530 command and may be listed with the
1533 The available server and session options are listed under the
1537 Similarly, a set of window options is attached to each window, and there is
1538 a set of global window options from which any unset options are inherited.
1539 Window options are altered with the
1540 .Ic set-window-option
1541 command and can be listed with the
1542 .Ic show-window-options
1544 All window options are documented with the
1545 .Ic set-window-option
1548 Commands which set options are as follows:
1550 .It Xo Ic set-option
1552 .Op Fl t Ar target-session | Ar target-window
1555 .D1 (alias: Ic set )
1556 Set a window option with
1559 .Ic set-window-option
1561 a server option with
1563 otherwise a session option.
1567 is specified, the global session or window option is set.
1570 and if the option expects a string,
1572 is appended to the existing setting.
1575 flag unsets an option, so a session inherits the option from the global
1577 It is not possible to unset a global option.
1579 Available window options are listed under
1580 .Ic set-window-option .
1582 Available server options are:
1585 Set the time in milliseconds for which
1587 waits after an escape is input to determine if it is part of a function or meta
1589 The default is 500 milliseconds.
1590 .It Ic exit-unattached
1591 If enabled, the server will exit when there are no attached clients, rather
1592 than when there are no attached sessions.
1594 Enable or disable the display of various informational messages (see also the
1599 Available session options are:
1601 .It Ic base-index Ar index
1602 Set the base index from which an unused index should be searched when a new
1604 The default is zero.
1605 .It Xo Ic bell-action
1606 .Op Ic any | none | current
1608 Set action on window bell.
1610 means a bell in any window linked to a session causes a bell in the current
1611 window of that session,
1613 means all bells are ignored and
1615 means only bell in windows other than the current window are ignored.
1616 .It Ic buffer-limit Ar number
1617 Set the number of buffers kept for each session; as new buffers are added to
1618 the top of the stack, old ones are removed from the bottom if necessary to
1619 maintain this maximum length.
1620 .It Ic default-command Ar shell-command
1621 Set the command used for new windows (if not specified when the window is
1627 The default is an empty string, which instructs
1629 to create a login shell using the value of the
1632 .It Ic default-shell Ar path
1633 Specify the default shell.
1634 This is used as the login shell for new windows when the
1636 option is set to empty, and must be the full path of the executable.
1639 tries to set a default value from the first suitable of the
1641 environment variable, the shell returned by
1645 This option should be configured when
1647 is used as a login shell.
1648 .It Ic default-path Ar path
1649 Set the default working directory for processes created from keys, or
1650 interactively from the prompt.
1651 The default is empty, which means to use the working directory of the shell
1652 from which the server was started if it is available or the user's home if not.
1653 .It Ic default-terminal Ar terminal
1654 Set the default terminal for new windows created in this session - the
1655 default value of the
1657 environment variable.
1660 to work correctly, this
1664 or a derivative of it.
1665 .It Ic destroy-unattached
1666 If enabled and the session is no longer attached to any clients, it is
1668 .It Ic detach-on-destroy
1669 If on (the default), the client is detached when the session it is attached to
1671 If off, the client is switched to the most recently active of the remaining
1673 .It Ic display-panes-active-colour Ar colour
1674 Set the colour used by the
1676 command to show the indicator for the active pane.
1677 .It Ic display-panes-colour Ar colour
1678 Set the colour used by the
1680 command to show the indicators for inactive panes.
1681 .It Ic display-panes-time Ar time
1682 Set the time in milliseconds for which the indicators shown by the
1685 .It Ic display-time Ar time
1686 Set the amount of time for which status line messages and other on-screen
1687 indicators are displayed.
1690 .It Ic history-limit Ar lines
1691 Set the maximum number of lines held in window history.
1692 This setting applies only to new windows - existing window histories are not
1693 resized and retain the limit at the point they were created.
1694 .It Ic lock-after-time Ar number
1695 Lock the session (like the
1699 seconds of inactivity, or the entire server (all sessions) if the
1702 The default is not to lock (set to 0).
1703 .It Ic lock-command Ar shell-command
1704 Command to run when locking each client.
1705 The default is to run
1709 .It Xo Ic lock-server
1715 instead of each session locking individually as each has been
1717 .Ic lock-after-time ,
1718 the entire server will lock after
1720 sessions would have locked.
1721 This has no effect as a session option; it must be set as a global option.
1722 .It Ic message-attr Ar attributes
1723 Set status line message attributes, where
1727 or a comma-delimited list of one or more of:
1738 .It Ic message-bg Ar colour
1739 Set status line message background colour, where
1753 from the 256-colour palette, or
1755 .It Ic message-fg Ar colour
1756 Set status line message foreground colour.
1757 .It Ic message-limit Ar number
1758 Set the number of error or information messages to save in the message log for
1761 .It Xo Ic mouse-select-pane
1766 captures the mouse and when a window is split into multiple panes the mouse may
1767 be used to select the current pane.
1768 The mouse click is also passed through to the application as normal.
1769 .It Ic pane-border-fg Ar colour
1770 .It Ic pane-border-bg Ar colour
1771 Set the pane border colour for panes aside from the active pane.
1772 .It Ic pane-active-border-fg Ar colour
1773 .It Ic pane-active-border-bg Ar colour
1774 Set the pane border colour for the currently active pane.
1775 .It Ic prefix Ar keys
1776 Set the keys accepted as a prefix key.
1778 is a comma-separated list of key names, each of which individually behave as
1780 .It Ic repeat-time Ar time
1781 Allow multiple commands to be entered without pressing the prefix-key again
1784 milliseconds (the default is 500).
1785 Whether a key repeats may be set when it is bound using the
1789 Repeat is enabled for the default keys bound to the
1792 .It Xo Ic set-remain-on-exit
1797 window option for any windows first created in this session.
1798 When this option is true, windows in which the running program has
1799 exited do not close, instead remaining open but inactivate.
1802 command to reactivate such a window, or the
1804 command to destroy it.
1805 .It Xo Ic set-titles
1808 Attempt to set the window title using the \ee]2;...\e007 xterm code if
1809 the terminal appears to be an xterm.
1810 This option is off by default.
1812 will only attempt to set the window title if the STY environment
1814 .It Ic set-titles-string Ar string
1815 String used to set the window title if
1818 Character sequences are replaced as for the
1824 Show or hide the status line.
1825 .It Ic status-attr Ar attributes
1826 Set status line attributes.
1827 .It Ic status-bg Ar colour
1828 Set status line background colour.
1829 .It Ic status-fg Ar colour
1830 Set status line foreground colour.
1831 .It Ic status-interval Ar interval
1832 Update the status bar every
1835 By default, updates will occur every 15 seconds.
1836 A setting of zero disables redrawing at interval.
1837 .It Xo Ic status-justify
1838 .Op Ic left | centre | right
1840 Set the position of the window list component of the status line: left, centre
1842 .It Xo Ic status-keys
1845 Use vi or emacs-style
1846 key bindings in the status line, for example at the command prompt.
1848 .It Ic status-left Ar string
1851 to the left of the status bar.
1853 will be passed through
1856 By default, the session name is shown.
1858 may contain any of the following special character sequences:
1859 .Bl -column "Character pair" "Replaced with" -offset indent
1860 .It Sy "Character pair" Ta Sy "Replaced with"
1861 .It Li "#(shell-command)" Ta "First line of the command's output"
1862 .It Li "#[attributes]" Ta "Colour or attribute change"
1863 .It Li "#H" Ta "Hostname of local host"
1864 .It Li "#F" Ta "Current window flag"
1865 .It Li "#I" Ta "Current window index"
1866 .It Li "#P" Ta "Current pane index"
1867 .It Li "#S" Ta "Session name"
1868 .It Li "#T" Ta "Current window title"
1869 .It Li "#W" Ta "Current window name"
1870 .It Li "##" Ta "A literal" Ql #
1873 The #(shell-command) form executes
1875 and inserts the first line of its output.
1876 Note that shell commands are only executed once at the interval specified by
1879 option: if the status line is redrawn in the meantime, the previous result is
1881 Shell commands are executed with the
1883 global environment set (see the
1887 The window title (#T) is the title set by the program running within the window
1888 using the OSC title setting sequence, for example:
1889 .Bd -literal -offset indent
1890 $ printf '\e033]2;My Title\e033\e\e'
1893 When a window is first created, its title is the hostname.
1895 #[attributes] allows a comma-separated list of attributes to be specified,
1898 to set the foreground colour,
1900 to set the background colour, the name of one of the attributes (listed under
1903 option) to turn an attribute on, or an attribute prefixed with
1905 to turn one off, for example
1908 .Bd -literal -offset indent
1909 #(sysctl vm.loadavg)
1910 #[fg=yellow,bold]#(apm -l)%%#[default] [#S]
1913 Where appropriate, special character sequences may be prefixed with a number to
1914 specify the maximum length, for example
1917 By default, UTF-8 in
1919 is not interpreted, to enable UTF-8, use the
1922 .It Ic status-left-attr Ar attributes
1923 Set the attribute of the left part of the status line.
1924 .It Ic status-left-fg Ar colour
1925 Set the foreground colour of the left part of the status line.
1926 .It Ic status-left-bg Ar colour
1927 Set the background colour of the left part of the status line.
1928 .It Ic status-left-length Ar length
1931 of the left component of the status bar.
1933 .It Ic status-right Ar string
1936 to the right of the status bar.
1937 By default, the current window title in double quotes, the date and the time
1944 character pairs are replaced, and UTF-8 is dependent on the
1947 .It Ic status-right-attr Ar attributes
1948 Set the attribute of the right part of the status line.
1949 .It Ic status-right-fg Ar colour
1950 Set the foreground colour of the right part of the status line.
1951 .It Ic status-right-bg Ar colour
1952 Set the background colour of the right part of the status line.
1953 .It Ic status-right-length Ar length
1956 of the right component of the status bar.
1959 .It Xo Ic status-utf8
1964 to treat top-bit-set characters in the
1968 strings as UTF-8; notably, this is important for wide characters.
1969 This option defaults to off.
1970 .It Ic terminal-overrides Ar string
1971 Contains a list of entries which override terminal descriptions read using
1974 is a comma-separated list of items each a colon-separated string made up of a
1975 terminal type pattern (matched using
1981 For example, to set the
1986 for all terminal types and the
1992 terminal type, the option could be set to the string:
1993 .Bd -literal -offset indent
1994 "*:clear=\ee[H\ee[2J,rxvt:dch1=\ee[P"
1997 The terminal entry value is passed through
1999 before interpretation.
2000 The default value forcibly corrects the
2002 entry for terminals which support 88 or 256 colours:
2003 .Bd -literal -offset indent
2004 "*88col*:colors=88,*256col*:colors=256"
2006 .It Ic update-environment Ar variables
2007 Set a space-separated string containing a list of environment variables to be
2008 copied into the session environment when a new session is created or an
2009 existing session is attached.
2010 Any variables that do not exist in the source environment are set to be
2011 removed from the session environment (as if
2017 "DISPLAY WINDOWID SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION".
2018 .It Xo Ic visual-activity
2021 If on, display a status line message when activity occurs in a window
2023 .Ic monitor-activity
2024 window option is enabled.
2025 .It Xo Ic visual-bell
2028 If this option is on, a message is shown on a bell instead of it being passed
2029 through to the terminal (which normally makes a sound).
2033 .It Xo Ic visual-content
2037 .Ic visual-activity ,
2038 display a message when content is present in a window
2041 window option is enabled.
2043 .It Xo Ic set-window-option
2045 .Op Fl t Ar target-window
2048 .D1 (alias: Ic setw )
2049 Set a window option.
2055 flags work similarly to the
2059 Supported window options are:
2061 .Bl -tag -width Ds -compact
2062 .It Xo Ic aggressive-resize
2065 Aggressively resize the chosen window.
2068 will resize the window to the size of the smallest session for which it is the
2069 current window, rather than the smallest session to which it is attached.
2070 The window may resize when the current window is changed on another sessions;
2071 this option is good for full-screen programs which support
2073 and poor for interactive programs such as shells.
2075 .It Xo Ic automatic-rename
2078 Control automatic window renaming.
2079 When this setting is enabled,
2081 will attempt - on supported platforms - to rename the window to reflect the
2082 command currently running in it.
2083 This flag is automatically disabled for an individual window when a name
2084 is specified at creation with
2089 It may be switched off globally with:
2090 .Bd -literal -offset indent
2091 set-window-option -g automatic-rename off
2094 .It Ic clock-mode-colour Ar colour
2097 .It Xo Ic clock-mode-style
2100 Set clock hour format.
2102 .It Ic force-height Ar height
2103 .It Ic force-width Ar width
2106 from resizing a window to greater than
2110 A value of zero restores the default unlimited setting.
2112 .It Ic main-pane-width Ar width
2113 .It Ic main-pane-height Ar height
2114 Set the width or height of the main (left or top) pane in the
2120 .It Ic mode-attr Ar attributes
2121 Set window modes attributes.
2123 .It Ic mode-bg Ar colour
2124 Set window modes background colour.
2126 .It Ic mode-fg Ar colour
2127 Set window modes foreground colour.
2132 Use vi or emacs-style key bindings in copy and choice modes.
2133 Key bindings default to emacs.
2135 .It Xo Ic mode-mouse
2138 Mouse state in modes.
2139 If on, the mouse may be used to copy a selection by dragging in copy mode, or
2140 to select an option in choice mode.
2142 .It Xo Ic monitor-activity
2145 Monitor for activity in the window.
2146 Windows with activity are highlighted in the status line.
2148 .It Ic monitor-content Ar match-string
2149 Monitor content in the window.
2154 appears in the window, it is highlighted in the status line.
2156 .It Xo Ic remain-on-exit
2159 A window with this flag set is not destroyed when the program running in it
2161 The window may be reactivated with the
2165 .It Xo Ic synchronize-panes
2168 Duplicate input to any pane to all other panes in the same window (only
2169 for panes that are not in any special mode).
2171 .It Xo Ic alternate-screen
2174 This option configures whether programs running inside
2176 may use the terminal alternate screen feature, which allows the
2181 capabilities to be issued to preserve the existing window content on start and
2189 to expect UTF-8 sequences to appear in this window.
2191 .It Ic window-status-attr Ar attributes
2192 Set status line attributes for a single window.
2194 .It Ic window-status-bg Ar colour
2195 Set status line background colour for a single window.
2197 .It Ic window-status-fg Ar colour
2198 Set status line foreground colour for a single window.
2200 .It Ic window-status-format Ar string
2201 Set the format in which the window is displayed in the status line window list.
2204 option for details of special character sequences available.
2208 .It Ic window-status-alert-attr Ar attributes
2209 Set status line attributes for windows which have an alert (bell, activity
2212 .It Ic window-status-alert-bg Ar colour
2213 Set status line background colour for windows with an alert.
2215 .It Ic window-status-alert-fg Ar colour
2216 Set status line foreground colour for windows with an alert.
2218 .It Ic window-status-current-attr Ar attributes
2219 Set status line attributes for the currently active window.
2221 .It Ic window-status-current-bg Ar colour
2222 Set status line background colour for the currently active window.
2224 .It Ic window-status-current-fg Ar colour
2225 Set status line foreground colour for the currently active window.
2227 .It Ic window-status-current-format Ar string
2229 .Ar window-status-format ,
2230 but is the format used when the window is the current window.
2232 .It Ic word-separators Ar string
2233 Sets the window's conception of what characters are considered word
2234 separators, for the purposes of the next and previous word commands in
2239 .It Xo Ic xterm-keys
2242 If this option is set,
2246 function key sequences; these have a number included to indicate modifiers such
2247 as Shift, Alt or Ctrl.
2250 .It Xo Ic show-options
2252 .Op Fl t Ar target-session | Ar target-window
2254 .D1 (alias: Ic show )
2255 Show the window options with
2258 .Ic show-window-options ) ,
2259 the server options with
2261 otherwise the session options for
2262 .Ar target session .
2263 Global session or window options are listed if
2266 .It Xo Ic show-window-options
2268 .Op Fl t Ar target-window
2270 .D1 (alias: Ic showw )
2271 List the window options for
2273 or the global window options if
2278 When the server is started,
2280 copies the environment into the
2281 .Em global environment ;
2282 in addition, each session has a
2283 .Em session environment .
2284 When a window is created, the session and global environments are merged with
2285 the session environment overriding any variable present in both.
2286 This is the initial environment passed to the new process.
2289 .Ic update-environment
2290 session option may be used to update the session environment from the client
2291 when a new session is created or an old reattached.
2293 also initialises the
2295 variable with some internal information to allow commands to be executed
2296 from inside, and the
2298 variable with the correct terminal setting of
2301 Commands to alter and view the environment are:
2303 .It Xo Ic set-environment
2305 .Op Fl t Ar target-session
2306 .Ar name Op Ar value
2308 .D1 (alias: Ic setenv )
2309 Set or unset an environment variable.
2312 is used, the change is made in the global environment; otherwise, it is applied
2313 to the session environment for
2314 .Ar target-session .
2317 flag unsets a variable.
2319 indicates the variable is to be removed from the environment before starting a
2321 .It Xo Ic show-environment
2323 .Op Fl t Ar target-session
2325 .D1 (alias: Ic showenv )
2326 Display the environment for
2328 or the global environment with
2330 Variables removed from the environment are prefixed with
2335 includes an optional status line which is displayed in the bottom line of each
2337 By default, the status line is enabled (it may be disabled with the
2339 session option) and contains, from left-to-right: the name of the current
2340 session in square brackets; the window list; the current window title in double
2341 quotes; and the time and date.
2343 The status line is made of three parts: configurable left and right sections
2344 (which may contain dynamic content such as the time or output from a shell
2347 .Ic status-left-length ,
2350 .Ic status-right-length
2351 options below), and a central window list.
2352 By default, the window list shows the index, name and (if any) flag of the
2353 windows present in the current session in ascending numerical order.
2354 It may be customised with the
2355 .Ar window-status-format
2357 .Ar window-status-current-format
2359 The flag is one of the following symbols appended to the window name:
2360 .Bl -column "Symbol" "Meaning" -offset indent
2361 .It Sy "Symbol" Ta Sy "Meaning"
2362 .It Li "*" Ta "Denotes the current window."
2363 .It Li "-" Ta "Marks the last window (previously selected)."
2364 .It Li "#" Ta "Window is monitored and activity has been detected."
2365 .It Li "!" Ta "A bell has occurred in the window."
2366 .It Li "+" Ta "Window is monitored for content and it has appeared."
2369 The # symbol relates to the
2370 .Ic monitor-activity
2374 The window name is printed in inverted colours if an alert (bell, activity or
2375 content) is present.
2377 The colour and attributes of the status line may be configured, the entire
2378 status line using the
2383 session options and individual windows using the
2384 .Ic window-status-attr ,
2385 .Ic window-status-fg
2387 .Ic window-status-bg
2390 The status line is automatically refreshed at interval if it has changed, the
2391 interval may be controlled with the
2395 Commands related to the status line are as follows:
2397 .It Xo Ic command-prompt
2399 .Op Fl t Ar target-client
2402 Open the command prompt in a client.
2403 This may be used from inside
2405 to execute commands interactively.
2408 is specified, it is used as the command.
2413 is a comma-separated list of prompts which are displayed in order; otherwise
2414 a single prompt is displayed, constructed from
2416 if it is present, or
2419 Before the command is executed, the first occurrence of the string
2421 and all occurrences of
2423 are replaced by the response to the first prompt, the second
2427 are replaced with the response to the second prompt, and so on for further
2429 Up to nine prompt responses may be replaced
2435 .It Xo Ic confirm-before
2436 .Op Fl t Ar target-client
2439 .D1 (alias: Ic confirm )
2440 Ask for confirmation before executing
2442 This command works only from inside
2444 .It Xo Ic display-message
2446 .Op Fl t Ar target-client
2449 .D1 (alias: Ic display )
2453 is given, the output is printed to stdout, otherwise it is displayed in the
2460 with the exception that #() are not handled.
2464 maintains a stack of
2467 Up to the value of the
2469 option are kept; when a new buffer is added, the buffer at the bottom of the
2471 Buffers may be added using
2475 command, and pasted into a window using the
2479 A configurable history buffer is also maintained for each window.
2480 By default, up to 2000 lines are kept; this can be altered with the
2486 The buffer commands are as follows:
2490 .Op Fl t Ar target-window
2493 Put a window into buffer choice mode, where a buffer may be chosen
2494 interactively from a list.
2495 After a buffer is selected,
2497 is replaced by the buffer index in
2499 and the result executed as a command.
2502 is not given, "paste-buffer -b '%%'" is used.
2503 This command works only from inside
2505 .It Ic clear-history Op Fl t Ar target-pane
2506 .D1 (alias: Ic clearhist )
2507 Remove and free the history for the specified pane.
2508 .It Xo Ic copy-buffer
2509 .Op Fl a Ar src-index
2510 .Op Fl b Ar dst-index
2511 .Op Fl s Ar src-session
2512 .Op Fl t Ar dst-session
2514 .D1 (alias: Ic copyb )
2515 Copy a session paste buffer to another session.
2516 If no sessions are specified, the current one is used instead.
2517 .It Xo Ic delete-buffer
2518 .Op Fl b Ar buffer-index
2519 .Op Fl t Ar target-session
2521 .D1 (alias: Ic deleteb )
2522 Delete the buffer at
2524 or the top buffer if not specified.
2525 .It Ic list-buffers Op Fl t Ar target-session
2526 .D1 (alias: Ic lsb )
2527 List the buffers in the given session.
2528 .It Xo Ic load-buffer
2529 .Op Fl b Ar buffer-index
2530 .Op Fl t Ar target-session
2533 .D1 (alias: Ic loadb )
2534 Load the contents of the specified paste buffer from
2536 .It Xo Ic paste-buffer
2538 .Op Fl b Ar buffer-index
2539 .Op Fl s Ar separator
2540 .Op Fl t Ar target-pane
2542 .D1 (alias: Ic pasteb )
2543 Insert the contents of a paste buffer into the specified pane.
2544 If not specified, paste into the current one.
2547 also delete the paste buffer from the stack.
2548 When output, any linefeed (LF) characters in the paste buffer are replaced with
2549 a separator, by default carriage return (CR).
2550 A custom separator may be specified using the
2555 flag means to do no replacement (equivalent to a separator of LF).
2556 .It Xo Ic save-buffer
2558 .Op Fl b Ar buffer-index
2559 .Op Fl t Ar target-session
2562 .D1 (alias: Ic saveb )
2563 Save the contents of the specified paste buffer to
2567 option appends to rather than overwriting the file.
2568 .It Xo Ic set-buffer
2569 .Op Fl b Ar buffer-index
2570 .Op Fl t Ar target-session
2573 .D1 (alias: Ic setb )
2574 Set the contents of the specified buffer to
2576 .It Xo Ic show-buffer
2577 .Op Fl b Ar buffer-index
2578 .Op Fl t Ar target-session
2580 .D1 (alias: Ic showb )
2581 Display the contents of the specified buffer.
2585 Miscellaneous commands are as follows:
2587 .It Ic clock-mode Op Fl t Ar target-pane
2588 Display a large clock.
2589 .It Ic if-shell Ar shell-command command
2597 .D1 (alias: Ic lock )
2598 Lock each client individually by running the command specified by the
2601 .It Ic run-shell Ar shell-command
2602 .D1 (alias: Ic run )
2605 in the background without creating a window.
2606 After it finishes, any output to stdout is displayed in copy mode.
2607 If the command doesn't return success, the exit status is also displayed.
2609 .D1 (alias: Ic info )
2610 Show server information and terminal details.
2613 .Bl -tag -width "/etc/tmux.confXXX" -compact
2618 .It Pa /etc/tmux.conf
2619 System-wide configuration file.
2627 .Dl $ tmux new-session vi
2629 Most commands have a shorter form, known as an alias.
2630 For new-session, this is
2635 Alternatively, the shortest unambiguous form of a command is accepted.
2636 If there are several options, they are listed:
2637 .Bd -literal -offset indent
2639 ambiguous command: n, could be: new-session, new-window, next-window
2642 Within an active session, a new window may be created by typing
2652 Windows may be navigated with:
2654 (to select window 0),
2656 (to select window 1), and so on;
2658 to select the next window; and
2660 to select the previous window.
2662 A session may be detached using
2664 (or by an external event such as
2666 disconnection) and reattached with:
2668 .Dl $ tmux attach-session
2672 lists the current key bindings in the current window; up and down may be used
2673 to navigate the list or
2677 Commands to be run when the
2679 server is started may be placed in the
2682 Common examples include:
2684 Changing the default prefix key:
2685 .Bd -literal -offset indent
2686 set-option -g prefix C-a
2688 bind-key C-a send-prefix
2691 Turning the status line off, or changing its colour:
2692 .Bd -literal -offset indent
2693 set-option -g status off
2694 set-option -g status-bg blue
2697 Setting other options, such as the default command,
2698 or locking after 30 minutes of inactivity:
2699 .Bd -literal -offset indent
2700 set-option -g default-command "exec /bin/ksh"
2701 set-option -g lock-after-time 1800
2704 Creating new key bindings:
2705 .Bd -literal -offset indent
2706 bind-key b set-option status
2707 bind-key / command-prompt "split-window 'exec man %%'"
2708 bind-key S command-prompt "new-window -n %1 'ssh %1'"
2713 .An Nicholas Marriott Aq nicm@users.sourceforge.net