[BACK]Return to tmux.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Annotation of src/usr.bin/tmux/tmux.1, Revision 1.71

1.71    ! nicm        1: .\" $OpenBSD: tmux.1,v 1.70 2009/08/18 07:08:26 nicm Exp $
1.1       nicm        2: .\"
                      3: .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
                      4: .\"
                      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.
                      8: .\"
                      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.
                     16: .\"
1.71    ! nicm       17: .Dd $Mdocdate: August 18 2009 $
1.1       nicm       18: .Dt TMUX 1
                     19: .Os
                     20: .Sh NAME
                     21: .Nm tmux
1.6       jmc        22: .Nd terminal multiplexer
1.1       nicm       23: .Sh SYNOPSIS
                     24: .Nm tmux
                     25: .Bk -words
                     26: .Op Fl 28dqUuv
                     27: .Op Fl f Ar file
                     28: .Op Fl L Ar socket-name
                     29: .Op Fl S Ar socket-path
                     30: .Op Ar command Op Ar flags
                     31: .Ek
                     32: .Sh DESCRIPTION
                     33: .Nm
1.59      jmc        34: is a terminal multiplexer:
                     35: it enables a number of terminals to be created, accessed, and
                     36: controlled from a single screen.
1.67      jmc        37: .Nm
                     38: may be detached from a screen
                     39: and continue running in the background,
                     40: then later reattached.
1.1       nicm       41: .Pp
1.60      nicm       42: When
                     43: .Nm
                     44: is started it creates a new
                     45: .Em session
                     46: with a single
                     47: .Em window
                     48: and displays it on screen.
                     49: A status line at the bottom of the screen
                     50: shows information on the current session
                     51: and is used to enter interactive commands.
                     52: .Pp
                     53: A session is a single collection of
                     54: .Em pseudo terminals
                     55: under the management of
                     56: .Nm .
                     57: Each session has one or more
                     58: windows linked to it.
                     59: A window occupies the entire screen
                     60: and may be split into rectangular panes,
                     61: each of which is a separate pseudo terminal
                     62: (the
                     63: .Xr pty 4
                     64: manual page documents the technical details of pseudo terminals).
                     65: Any number of
                     66: .Nm
                     67: instances may connect to the same session,
                     68: and any number of windows may be present in the same session.
                     69: Once all sessions are killed,
                     70: .Nm
                     71: exits.
                     72: .Pp
1.64      nicm       73: Each session is persistent and will survive accidental disconnection
1.66      jmc        74: (such as
1.64      nicm       75: .Xr ssh 1
1.67      jmc        76: connection timeout) or intentional detaching (with the
1.64      nicm       77: .Ql C-b d
                     78: key strokes).
                     79: .Nm
                     80: may be reattached using:
                     81: .Pp
                     82: .Dl $ tmux attach
1.60      nicm       83: .Pp
1.64      nicm       84: In
                     85: .Nm ,
                     86: a session is displayed on screen by a
                     87: .Em client
                     88: and all sessions are managed by a single
                     89: .Em server .
                     90: The server and each client are separate processes which communicate through a
                     91: socket in
                     92: .Pa /tmp .
1.65      nicm       93: .Pp
1.1       nicm       94: The options are as follows:
                     95: .Bl -tag -width "XXXXXXXXXXXX"
                     96: .It Fl 2
                     97: Force
                     98: .Nm
                     99: to assume the terminal supports 256 colours.
                    100: .It Fl 8
                    101: Like
                    102: .Fl 2 ,
1.6       jmc       103: but indicates that the terminal supports 88 colours.
1.1       nicm      104: .It Fl d
                    105: Force
                    106: .Nm
                    107: to assume the terminal supports default colours.
                    108: .It Fl f Ar file
                    109: Specify an alternative configuration file.
                    110: By default,
                    111: .Nm
1.26      nicm      112: loads the system configuration file from
                    113: .Pa /etc/tmux.conf ,
                    114: if present, then looks for a user configuration file at
1.1       nicm      115: .Pa ~/.tmux.conf .
                    116: The configuration file is a set of
                    117: .Nm
                    118: commands which are executed in sequence when the server is first started.
1.61      nicm      119: .Pp
                    120: If a command in the configuration file fails,
                    121: .Nm
                    122: will report an error and exit without executing further commands.
1.1       nicm      123: .It Fl L Ar socket-name
                    124: .Nm
                    125: stores the server socket in a directory under
                    126: .Pa /tmp ;
                    127: the default socket is named
                    128: .Em default .
                    129: This option allows a different socket name to be specified, allowing several
                    130: independent
                    131: .Nm
                    132: servers to be run.
                    133: Unlike
                    134: .Fl S
                    135: a full path is not necessary: the sockets are all created in the same
                    136: directory.
1.2       nicm      137: .Pp
                    138: If the socket is accidentally removed, the
1.6       jmc       139: .Dv SIGUSR1
1.2       nicm      140: signal may be sent to the
                    141: .Nm
                    142: server process to recreate it.
1.4       sobrado   143: .It Fl q
1.6       jmc       144: Prevent the server sending various informational messages, for example when
1.4       sobrado   145: window flags are altered.
1.1       nicm      146: .It Fl S Ar socket-path
                    147: Specify a full alternative path to the server socket.
                    148: If
                    149: .Fl S
                    150: is specified, the default socket directory is not used and any
                    151: .Fl L
                    152: flag is ignored.
                    153: .It Fl U
                    154: Unlock the server.
                    155: .It Fl u
                    156: .Nm
1.14      nicm      157: attempts to guess if the terminal is likely to support UTF-8 by checking the
                    158: first of the
                    159: .Ev LC_ALL ,
                    160: .Ev LC_CTYPE
                    161: and
1.2       nicm      162: .Ev LANG
1.14      nicm      163: environment variables to be set for the string "UTF-8".
1.5       nicm      164: This is not always correct: the
1.2       nicm      165: .Fl u
                    166: flag explicitly informs
                    167: .Nm
1.6       jmc       168: that UTF-8 is supported.
1.33      nicm      169: .Pp
                    170: If the server is started from a client passed
                    171: .Fl u
                    172: or where UTF-8 is detected, the
                    173: .Ic utf8
                    174: and
                    175: .Ic status-utf8
                    176: options are enabled in the global window and session options respectively.
1.1       nicm      177: .It Fl v
                    178: Request verbose logging.
                    179: This option may be specified multiple times for increasing verbosity.
                    180: Log messages will be saved into
                    181: .Pa tmux-client-PID.log
                    182: and
                    183: .Pa tmux-server-PID.log
                    184: files in the current directory, where
                    185: .Em PID
1.6       jmc       186: is the PID of the server or client process.
1.1       nicm      187: .It Ar command Op Ar flags
                    188: This specifies one of a set of commands used to control
                    189: .Nm ,
1.6       jmc       190: as described in the following sections.
1.59      jmc       191: If no commands are specified, the
1.1       nicm      192: .Ic new-session
                    193: command is assumed.
1.57      jmc       194: .El
1.64      nicm      195: .Sh KEY BINDINGS
                    196: .Nm
                    197: may be controlled from an attached client by using a key combination of a
                    198: prefix key,
                    199: .Ql C-b
                    200: (Ctrl-b) by default, followed by a command key.
                    201: .Pp
                    202: Some of the default key bindings are:
                    203: .Pp
1.67      jmc       204: .Bl -tag -width Ds -offset indent -compact
1.64      nicm      205: .It c
1.65      nicm      206: Create a new window.
1.64      nicm      207: .It d
1.65      nicm      208: Detach the current client.
1.64      nicm      209: .It l
1.65      nicm      210: Move to the previously selected window.
1.64      nicm      211: .It n
1.65      nicm      212: Change to the next window.
1.64      nicm      213: .It p
1.65      nicm      214: Change to the previous window.
                    215: .It &
                    216: Kill the current window.
                    217: .It ,
                    218: Rename the current window.
1.64      nicm      219: .It \&?
1.65      nicm      220: List all key bindings.
1.64      nicm      221: .El
                    222: .Pp
                    223: A complete list may be obtained with the
                    224: .Ic list-keys
                    225: command (bound to
                    226: .Ql \&?
                    227: by default).
                    228: Key bindings may be changed with the
                    229: .Ic bind-key
                    230: and
                    231: .Ic unbind-key
                    232: commands.
1.57      jmc       233: .Sh COMMANDS
                    234: This section contains a list of the commands supported by
                    235: .Nm .
                    236: Most commands accept the optional
                    237: .Fl t
                    238: argument with one of
                    239: .Ar target-client ,
                    240: .Ar target-session
                    241: .Ar target-window ,
                    242: or
                    243: .Ar target-pane .
                    244: These specify the client, session, window or pane which a command should affect.
                    245: .Ar target-client
                    246: is the name of the
                    247: .Xr pty 4
                    248: file to which the client is connected, for example either of
                    249: .Pa /dev/ttyp1
                    250: or
                    251: .Pa ttyp1
                    252: for the client attached to
                    253: .Pa /dev/ttyp1 .
                    254: If no client is specified, the current client is chosen, if possible, or an
                    255: error is reported.
                    256: Clients may be listed with the
                    257: .Ic list-clients
                    258: command.
1.1       nicm      259: .Pp
1.57      jmc       260: .Ar target-session
                    261: is either the name of a session (as listed by the
                    262: .Ic list-sessions
                    263: command) or the name of a client with the same syntax as
                    264: .Ar target-client ,
                    265: in which case the session attached to the client is used.
                    266: When looking for the session name,
                    267: .Nm
                    268: initially searches for an exact match; if none is found, the session names
                    269: are checked for any for which
                    270: .Ar target-session
                    271: is a prefix or for which it matches as an
                    272: .Xr fnmatch 3
                    273: pattern.
                    274: If a single match is found, it is used as the target session; multiple matches
                    275: produce an error.
                    276: If a session is omitted, the current session is used if available; if no
                    277: current session is available, the most recently created is chosen.
1.1       nicm      278: .Pp
1.57      jmc       279: .Ar target-window
                    280: specifies a window in the form
                    281: .Em session Ns \&: Ns Em window .
                    282: .Em session
                    283: follows the same rules as for
                    284: .Ar target-session ,
                    285: and
                    286: .Em window
                    287: is looked for in order: as a window index, for example mysession:1; as an exact
                    288: window name, such as mysession:mywindow; then as an
                    289: .Xr fnmatch 3
                    290: pattern or the start of a window name, such as mysession:mywin* or
                    291: mysession:mywin.
                    292: An empty window name specifies the next unused index if appropriate (for
                    293: example the
                    294: .Ic new-window
                    295: and
                    296: .Ic link-window
                    297: commands)
                    298: otherwise the current window in
                    299: .Em session
                    300: is chosen.
                    301: When the argument does not contain a colon,
                    302: .Nm
                    303: first attempts to parse it as window; if that fails, an attempt is made to
                    304: match a session.
1.1       nicm      305: .Pp
1.57      jmc       306: .Ar target-pane
                    307: takes a similar form to
                    308: .Ar target-window
                    309: but with the optional addition of a period followed by a pane index, for
                    310: example: mysession:mywindow.1.
                    311: If the pane index is omitted, the currently active pane in the specified
                    312: window is used.
                    313: If neither a colon nor period appears,
1.13      nicm      314: .Nm
1.57      jmc       315: first attempts to use the argument as a pane index; if that fails, it is looked
                    316: up as for
                    317: .Ar target-window .
1.15      jmc       318: .Pp
1.57      jmc       319: Multiple commands may be specified together as part of a
                    320: .Em command sequence .
                    321: Each command should be separated by spaces and a semicolon;
                    322: commands are executed sequentially from left to right.
                    323: A literal semicolon may be included by escaping it with a backslash (for
                    324: example, when specifying a command sequence to
                    325: .Ic bind-key ) .
1.13      nicm      326: .Pp
1.57      jmc       327: Examples include:
1.13      nicm      328: .Bd -literal -offset indent
1.57      jmc       329: refresh-client -t/dev/ttyp2
                    330:
                    331: rename-session -tfirst newname
                    332:
                    333: set-window-option -t:0 monitor-activity on
                    334:
                    335: new-window ; split-window -d
                    336:
                    337: bind-key D detach-client \e\; lock-server
1.13      nicm      338: .Ed
1.57      jmc       339: .Sh CLIENTS AND SESSIONS
                    340: The following commands are available:
                    341: .Bl -tag -width Ds
                    342: .It Xo Ic attach-session
                    343: .Op Fl d
                    344: .Op Fl t Ar target-session
                    345: .Xc
                    346: .D1 (alias: Ic attach )
                    347: If run from outside
                    348: .Nm ,
                    349: create a new client in the current terminal and attach it to
                    350: .Ar target-session .
                    351: If used from inside, switch the current client.
                    352: If
                    353: .Fl d
                    354: is specified, any other clients attached to the session are detached.
1.13      nicm      355: .Pp
1.57      jmc       356: If no server is started,
                    357: .Ic attach-session
                    358: will attempt to start it; this will fail unless sessions are created in the
                    359: configuration file.
                    360: .It Ic detach-client Op Fl t Ar target-client
                    361: .D1 (alias: Ic detach )
                    362: Detach the current client if bound to a key, or the specified client with
                    363: .Fl t .
                    364: .It Ic has-session Op Fl t Ar target-session
                    365: .D1 (alias: Ic has )
                    366: Report an error and exit with 1 if the specified session does not exist.
                    367: If it does exist, exit with 0.
                    368: .It Ic kill-server
                    369: Kill the
1.1       nicm      370: .Nm
1.57      jmc       371: server and clients and destroy all sessions.
                    372: .It Ic kill-session Op Fl t Ar target-session
                    373: Destroy the given session, closing any windows linked to it and no other
                    374: sessions, and detaching all clients attached to it.
                    375: .It Ic list-clients
                    376: .D1 (alias: Ic lsc )
                    377: List all clients attached to the server.
                    378: .It Ic list-commands
                    379: .D1 (alias: Ic lscm )
                    380: List the syntax of all commands supported by
                    381: .Nm .
                    382: .It Ic list-sessions
                    383: .D1 (alias: Ic ls )
                    384: List all sessions managed by the server.
                    385: .It Xo Ic new-session
                    386: .Op Fl d
                    387: .Op Fl n Ar window-name
                    388: .Op Fl s Ar session-name
                    389: .Op Ar command
                    390: .Xc
                    391: .D1 (alias: Ic new )
                    392: Create a new session with name
                    393: .Ar session-name .
                    394: The new session is attached to the current terminal unless
                    395: .Fl d
                    396: is given.
                    397: .Ar window-name
1.1       nicm      398: and
1.57      jmc       399: .Ar command
                    400: are the name of and command to execute in the initial window.
1.68      nicm      401: .Pp
                    402: If run from a terminal, any
                    403: .Xr termios 4
                    404: special characters are saved and used for new windows in the new session.
1.57      jmc       405: .It Ic refresh-client Op Fl t Ar target-client
                    406: .D1 (alias: Ic refresh )
                    407: Refresh the current client if bound to a key, or a single client if one is given
                    408: with
                    409: .Fl t .
                    410: .It Xo Ic rename-session
                    411: .Op Fl t Ar target-session
                    412: .Ar new-name
                    413: .Xc
                    414: .D1 (alias: Ic rename )
                    415: Rename the session to
                    416: .Ar new-name .
                    417: .It Ic source-file Ar path
                    418: .D1 (alias: Ic source )
                    419: Execute commands from
                    420: .Ar path .
                    421: .It Ic start-server
                    422: .D1 (alias: Ic start )
                    423: Start the
1.1       nicm      424: .Nm
1.57      jmc       425: server, if not already running, without creating any sessions.
                    426: .It Xo Ic suspend-client
                    427: .Op Fl c Ar target-client
                    428: .Xc
                    429: .D1 (alias: Ic suspendc )
                    430: Suspend a client by sending
                    431: .Dv SIGTSTP
                    432: (tty stop).
                    433: .It Xo Ic switch-client
                    434: .Op Fl c Ar target-client
                    435: .Op Fl t Ar target-session
                    436: .Xc
                    437: .D1 (alias: Ic switchc )
                    438: Switch the current session for client
                    439: .Ar target-client
                    440: to
                    441: .Ar target-session .
                    442: .El
                    443: .Sh WINDOWS AND PANES
1.1       nicm      444: A
                    445: .Nm
                    446: window may be in one of several modes.
                    447: The default permits direct access to the terminal attached to the window.
                    448: The others are:
                    449: .Bl -tag -width Ds
                    450: .It Em output mode
                    451: This is entered when a command which produces output, such as
                    452: .Ic list-keys ,
                    453: is executed from a key binding.
                    454: .It Em scroll mode
                    455: This is entered with the
                    456: .Ic scroll-mode
                    457: command (bound to
                    458: .Ql =
                    459: by default) and permits the window history buffer to be inspected.
                    460: .It Em copy mode
                    461: This permits a section of a window or its history to be copied to a
                    462: .Em paste buffer
                    463: for later insertion into another window.
                    464: This mode is entered with the
                    465: .Ic copy-mode
                    466: command, bound to
                    467: .Ql [
                    468: by default.
                    469: .El
                    470: .Pp
1.6       jmc       471: The keys available depend on whether emacs or vi mode is selected
                    472: (see the
1.1       nicm      473: .Ic mode-keys
                    474: option).
                    475: The following keys are supported as appropriate for the mode:
                    476: .Bl -column "FunctionXXXXXXXXXXXX" "viXXXXXX" "emacs" -offset indent
                    477: .It Sy "Function" Ta Sy "vi" Ta Sy "emacs"
1.27      nicm      478: .It Li "Back to indentation" Ta "^" Ta "M-m"
1.1       nicm      479: .It Li "Clear selection" Ta "Escape" Ta "C-g"
                    480: .It Li "Copy selection" Ta "Enter" Ta "M-w"
                    481: .It Li "Cursor down" Ta "j" Ta "Down"
1.70      nicm      482: .It Li "Cursor left" Ta "h" Ta "Left"
                    483: .It Li "Cursor right" Ta "l" Ta "Right"
                    484: .It Li "Cursor up" Ta "k" Ta "Up"
1.71    ! nicm      485: .It Li "Delete entire line" Ta "d" Ta "C-u"
1.70      nicm      486: .It Li "Delete to end of line" Ta "D" Ta "C-k"
1.1       nicm      487: .It Li "End of line" Ta "$" Ta "C-e"
1.70      nicm      488: .It Li "Goto line" Ta "g" Ta "g"
1.1       nicm      489: .It Li "Next page" Ta "C-f" Ta "Page down"
                    490: .It Li "Next word" Ta "w" Ta "M-f"
1.70      nicm      491: .It Li "Paste buffer" Ta "p" Ta "C-y"
1.1       nicm      492: .It Li "Previous page" Ta "C-u" Ta "Page up"
                    493: .It Li "Previous word" Ta "b" Ta "M-b"
                    494: .It Li "Quit mode" Ta "q" Ta "Escape"
1.70      nicm      495: .It Li "Search again" Ta "n" Ta "n"
                    496: .It Li "Search backward" Ta "?" Ta "C-r"
                    497: .It Li "Search forward" Ta "/" Ta "C-s"
                    498: .It Li "Start of line" Ta "0" Ta "C-a"
1.1       nicm      499: .It Li "Start selection" Ta "Space" Ta "C-Space"
                    500: .El
                    501: .Pp
1.48      nicm      502: These key bindings are defined in a set of named tables:
                    503: .Em vi-edit
                    504: and
                    505: .Em emacs-edit
                    506: for keys used when line editing at the command prompt;
                    507: .Em vi-choice
                    508: and
                    509: .Em emacs-choice
                    510: for keys used when choosing from lists (such as produced by the
                    511: .Ic window-choose
                    512: command) or in output mode; and
                    513: .Em vi-copy
                    514: and
                    515: .Em emacs-copy
                    516: used in copy and scroll modes.
                    517: The tables may be viewed with the
                    518: .Ic list-keys
1.49      nicm      519: command and keys modified or removed with
                    520: .Ic bind-key
                    521: and
                    522: .Ic unbind-key .
1.48      nicm      523: .Pp
1.2       nicm      524: The paste buffer key pastes the first line from the top paste buffer on the
                    525: stack.
1.57      jmc       526: .Pp
                    527: The mode commands are as follows:
                    528: .Bl -tag -width Ds
                    529: .It Xo Ic copy-mode
                    530: .Op Fl u
                    531: .Op Fl t Ar target-window
                    532: .Xc
                    533: Enter copy mode.
                    534: The
                    535: .Fl u
                    536: option scrolls one page up.
                    537: .It Xo Ic scroll-mode
                    538: .Op Fl u
                    539: .Op Fl t Ar target-window
                    540: .Xc
                    541: Enter scroll mode.
                    542: The
                    543: .Fl u
                    544: has the same meaning as in the
1.1       nicm      545: .Ic copy-mode
1.18      nicm      546: command.
1.57      jmc       547: .El
1.18      nicm      548: .Pp
1.1       nicm      549: Each window displayed by
                    550: .Nm
                    551: may be split into one or more
                    552: .Em panes ;
                    553: each pane takes up a certain area of the display and is a separate terminal.
                    554: A window may be split into panes using the
                    555: .Ic split-window
                    556: command.
1.38      nicm      557: Windows may be split horizontally (with the
                    558: .Fl h
                    559: flag) or vertically.
                    560: Panes may be resized with the
                    561: .Ic resize-pane
1.1       nicm      562: command (bound to
1.38      nicm      563: .Ql C-up ,
                    564: .Ql C-down
                    565: .Ql C-left
                    566: and
                    567: .Ql C-right
1.1       nicm      568: by default), the current pane may be changed with the
                    569: .Ic up-pane
                    570: and
                    571: .Ic down-pane
                    572: commands and the
                    573: .Ic rotate-window
                    574: and
                    575: .Ic swap-pane
1.38      nicm      576: commands may be used to swap panes without changing their position.
                    577: Panes are numbered beginning from zero in the order they are created.
                    578: .Pp
                    579: A number of preset
                    580: .Em layouts
                    581: are available.
                    582: These may be selected with the
                    583: .Ic select-layout
                    584: command or cycled with
                    585: .Ic next-layout
                    586: (bound to
                    587: .Ql C-space
                    588: by default); once a layout is chosen, panes within it may be moved and resized as normal.
1.1       nicm      589: .Pp
                    590: The following layouts are supported:
                    591: .Bl -tag -width Ds
                    592: .It Ic even-horizontal
                    593: Panes are spread out evenly from left to right across the window.
                    594: .It Ic even-vertical
                    595: Panes are spread evenly from top to bottom.
1.2       nicm      596: .It Ic main-horizontal
                    597: A large (main) pane is shown at the top of the window and the remaining panes are
1.6       jmc       598: spread from left to right in the leftover space at the bottom.
1.2       nicm      599: Use the
                    600: .Em main-pane-height
                    601: window option to specify the height of the top pane.
1.1       nicm      602: .It Ic main-vertical
1.2       nicm      603: Similar to
                    604: .Ic main-horizontal
                    605: but the large pane is placed on the left and the others spread from top to
                    606: bottom along the right.
                    607: See the
                    608: .Em main-pane-width
                    609: window option.
1.1       nicm      610: .El
1.8       nicm      611: .Pp
1.57      jmc       612: Commands related to windows and panes are as follows:
                    613: .Bl -tag -width Ds
                    614: .It Xo Ic break-pane
                    615: .Op Fl d
                    616: .Op Fl t Ar target-pane
                    617: .Xc
                    618: .D1 (alias: Ic breakp )
                    619: Break
                    620: .Ar target-pane
                    621: off from its containing window to make it the only pane in a new window.
                    622: If
                    623: .Fl d
                    624: is given, the new window does not become the current window.
                    625: .It Ic choose-session Op Fl t Ar target-window
                    626: Put a window into session choice mode, where the session for the current
                    627: client may be selected interactively from a list.
                    628: This command works only from inside
                    629: .Nm .
                    630: .It Ic choose-window Op Fl t Ar target-window
                    631: Put a window into window choice mode, where the window for the session
                    632: attached to the current client may be selected interactively from a list.
                    633: This command works only from inside
                    634: .Nm .
                    635: .It Ic down-pane Op Fl t Ar target-pane
                    636: .D1 (alias: Ic downp )
                    637: Move down a pane.
                    638: .It Xo Ic find-window
                    639: .Op Fl t Ar target-window
                    640: .Ar match-string
                    641: .Xc
                    642: .D1 (alias: Ic findw )
                    643: Search for the
                    644: .Xr fnmatch 3
                    645: pattern
                    646: .Ar match-string
                    647: in window names, titles, and visible content (but not history).
                    648: If only one window is matched, it'll be automatically selected, otherwise a
                    649: choice list is shown.
                    650: This command only works from inside
1.1       nicm      651: .Nm .
1.57      jmc       652: .It Ic kill-pane Op Fl t Ar target-pane
                    653: .D1 (alias: Ic killp )
                    654: Destroy the given pane.
                    655: If no panes remain in the containing window, it is also destroyed.
                    656: .It Ic kill-window Op Fl t Ar target-window
                    657: .D1 (alias: Ic killw )
                    658: Kill the current window or the window at
                    659: .Ar target-window ,
1.1       nicm      660: removing it from any sessions to which it is linked.
1.56      jmc       661: .It Ic last-window Op Fl t Ar target-session
1.1       nicm      662: .D1 (alias: Ic last )
                    663: Select the last (previously selected) window.
                    664: If no
                    665: .Ar target-session
                    666: is specified, select the last window of the current session.
                    667: .It Xo Ic link-window
                    668: .Op Fl dk
                    669: .Op Fl s Ar src-window
                    670: .Op Fl t Ar dst-window
                    671: .Xc
                    672: .D1 (alias: Ic linkw )
                    673: Link the window at
                    674: .Ar src-window
                    675: to the specified
                    676: .Ar dst-window .
                    677: If
                    678: .Ar dst-window
                    679: is specified and no such window exists, the
                    680: .Ar src-window
                    681: is linked there.
                    682: If
                    683: .Fl k
                    684: is given and
                    685: .Ar dst-window
                    686: exists, it is killed, otherwise an error is generated.
                    687: If
                    688: .Fl d
                    689: is given, the newly linked window is not selected.
1.56      jmc       690: .It Ic list-windows Op Fl t Ar target-session
1.1       nicm      691: .D1 (alias: Ic lsw )
                    692: List windows in the current session or in
                    693: .Ar target-session .
                    694: .It Xo Ic move-window
                    695: .Op Fl d
                    696: .Op Fl s Ar src-window
                    697: .Op Fl t Ar dst-window
                    698: .Xc
                    699: .D1 (alias: Ic movew )
                    700: This is similar to
                    701: .Ic link-window ,
                    702: except the window at
                    703: .Ar src-window
                    704: is moved to
                    705: .Ar dst-window .
                    706: .It Xo Ic new-window
1.28      nicm      707: .Op Fl dk
1.1       nicm      708: .Op Fl n Ar window-name
                    709: .Op Fl t Ar target-window
                    710: .Op Ar command
                    711: .Xc
                    712: .D1 (alias: Ic neww )
                    713: Create a new window.
                    714: If
                    715: .Fl d
                    716: is given, the session does not make the new window the current window.
                    717: .Ar target-window
1.28      nicm      718: represents the window to be created; if the target already exists an error is
                    719: shown, unless the
                    720: .Fl k
                    721: flag is used, in which case it is destroyed.
1.1       nicm      722: .Ar command
                    723: is the command to execute.
                    724: If
                    725: .Ar command
                    726: is not specified, the default command is used.
                    727: .Pp
                    728: The
                    729: .Ev TERM
                    730: environment variable must be set to
                    731: .Dq screen
                    732: for all programs running
                    733: .Em inside
                    734: .Nm .
                    735: New windows will automatically have
                    736: .Dq TERM=screen
                    737: added to their environment, but care must be taken not to reset this in shell
                    738: start-up files.
1.56      jmc       739: .It Ic next-layout Op Fl t Ar target-window
1.1       nicm      740: .D1 (alias: Ic nextl )
                    741: Move a window to the next layout and rearrange the panes to fit.
                    742: .It Xo Ic next-window
1.9       nicm      743: .Op Fl a
1.1       nicm      744: .Op Fl t Ar target-session
                    745: .Xc
                    746: .D1 (alias: Ic next )
                    747: Move to the next window in the session.
1.9       nicm      748: If
1.12      jmc       749: .Fl a
1.9       nicm      750: is used, move to the next window with a bell, activity or content alert.
1.1       nicm      751: .It Xo Ic previous-window
1.9       nicm      752: .Op Fl a
1.1       nicm      753: .Op Fl t Ar target-session
                    754: .Xc
                    755: .D1 (alias: Ic prev )
                    756: Move to the previous window in the session.
1.9       nicm      757: With
                    758: .Fl a ,
                    759: move to the previous window with a bell, activity or content alert.
1.1       nicm      760: .It Xo Ic rename-window
                    761: .Op Fl t Ar target-window
                    762: .Ar new-name
                    763: .Xc
                    764: .D1 (alias: Ic renamew )
                    765: Rename the current window, or the window at
                    766: .Ar target-window
                    767: if specified, to
                    768: .Ar new-name .
                    769: .It Xo Ic resize-pane
1.39      jmc       770: .Op Fl DLRU
1.52      nicm      771: .Op Fl t Ar target-pane
1.1       nicm      772: .Op Ar adjustment
                    773: .Xc
                    774: .D1 (alias: Ic resizep )
1.57      jmc       775: Resize a pane, upward with
                    776: .Fl U
                    777: (the default), downward with
                    778: .Fl D ,
                    779: to the left with
                    780: .Fl L
                    781: and to the right with
                    782: .Fl R .
                    783: The
                    784: .Ar adjustment
                    785: is given in lines or cells (the default is 1).
                    786: .It Xo Ic respawn-window
                    787: .Op Fl k
                    788: .Op Fl t Ar target-window
                    789: .Op Ar command
                    790: .Xc
                    791: .D1 (alias: Ic respawnw )
                    792: Reactive a window in which the command has exited (see the
                    793: .Ic remain-on-exit
                    794: window option).
                    795: If
                    796: .Ar command
                    797: is not given, the command used when the window was created is executed.
                    798: The window must be already inactive, unless
                    799: .Fl k
                    800: is given, in which case any existing command is killed.
                    801: .It Xo Ic rotate-window
                    802: .Op Fl DU
                    803: .Op Fl t Ar target-window
                    804: .Xc
                    805: .D1 (alias: Ic rotatew )
                    806: Rotate the positions of the panes within a window, either upward (numerically
                    807: lower) with
                    808: .Fl U
                    809: or downward (numerically higher).
                    810: .It Xo Ic select-layout
                    811: .Op Fl t Ar target-window
                    812: .Op Ar layout-name
                    813: .Xc
                    814: .D1 (alias: selectl )
                    815: Choose a specific layout for a window.
                    816: If
                    817: .Ar layout-name
                    818: is not given, the last layout used (if any) is reapplied.
                    819: .It Ic select-pane Op Fl t Ar target-pane
                    820: .D1 (alias: Ic selectp )
                    821: Make pane
                    822: .Ar target-pane
                    823: the active pane in window
                    824: .Ar target-window .
                    825: .It Ic select-window Op Fl t Ar target-window
                    826: .D1 (alias: Ic selectw )
                    827: Select the window at
                    828: .Ar target-window .
                    829: .It Xo Ic split-window
                    830: .Op Fl dhv
                    831: .Oo Fl l
                    832: .Ar size |
                    833: .Fl p Ar percentage Oc
                    834: .Op Fl t Ar target-window
                    835: .Op Ar command
                    836: .Xc
                    837: .D1 (alias: splitw )
                    838: Creates a new pane by splitting the active pane:
                    839: .Fl h
                    840: does a horizontal split and
                    841: .Fl v
                    842: a vertical split; if neither is specified,
                    843: .Fl v
                    844: is assumed.
                    845: The
                    846: .Fl l
                    847: and
                    848: .Fl p
                    849: options specify the size of the new window in lines (for vertical split) or in
                    850: cells (for horizontal split), or as a percentage, respectively.
                    851: All other options have the same meaning as in the
                    852: .Ic new-window
                    853: command.
                    854: .It Xo Ic swap-pane
                    855: .Op Fl dDU
                    856: .Op Fl s Ar src-pane
                    857: .Op Fl t Ar dst-pane
                    858: .Xc
                    859: .D1 (alias: Ic swapp )
                    860: Swap two panes.
                    861: If
                    862: .Fl U
                    863: is used and no source pane is specified with
                    864: .Fl s ,
                    865: .Ar dst-pane
                    866: is swapped with the previous pane (before it numerically);
                    867: .Fl D
                    868: swaps with the next pane (after it numerically).
                    869: .It Xo Ic swap-window
                    870: .Op Fl d
                    871: .Op Fl s Ar src-window
                    872: .Op Fl t Ar dst-window
                    873: .Xc
                    874: .D1 (alias: Ic swapw )
                    875: This is similar to
                    876: .Ic link-window ,
                    877: except the source and destination windows are swapped.
                    878: It is an error if no window exists at
                    879: .Ar src-window .
                    880: .It Xo Ic unlink-window
1.1       nicm      881: .Op Fl k
                    882: .Op Fl t Ar target-window
                    883: .Xc
1.57      jmc       884: .D1 (alias: Ic unlinkw )
                    885: Unlink
                    886: .Ar target-window .
                    887: Unless
                    888: .Fl k
                    889: is given, a window may be unlinked only if it is linked to multiple sessions -
                    890: windows may not be linked to no sessions;
                    891: if
1.1       nicm      892: .Fl k
1.57      jmc       893: is specified and the window is linked to only one session, it is unlinked and
                    894: destroyed.
                    895: .It Ic up-pane Op Fl t Ar target-pane
                    896: .D1 (alias: Ic upp )
                    897: Move up a pane.
                    898: .El
                    899: .Sh KEY BINDINGS
                    900: Commands related to key bindings are as follows:
                    901: .Bl -tag -width Ds
                    902: .It Xo Ic bind-key
                    903: .Op Fl cnr
                    904: .Op Fl t Ar key-table
                    905: .Ar key Ar command Op Ar arguments
1.1       nicm      906: .Xc
1.57      jmc       907: .D1 (alias: Ic bind )
                    908: Bind key
                    909: .Ar key
                    910: to
                    911: .Ar command .
                    912: Keys may be specified prefixed with
                    913: .Ql C-
                    914: or
                    915: .Ql ^
                    916: for Ctrl keys, or
                    917: .Ql M-
                    918: for Alt (meta) keys.
                    919: .Pp
                    920: By default (without
                    921: .Fl t )
                    922: the primary key bindings are modified (those normally activated with the prefix
                    923: key); in this case, if
                    924: .Fl n
                    925: is specified, it is not necessary to use the prefix key,
                    926: .Ar command
                    927: is bound to
                    928: .Ar key
                    929: alone.
1.1       nicm      930: The
1.57      jmc       931: .Fl r
                    932: flag indicates this key may repeat, see the
                    933: .Ic repeat-time
                    934: option.
                    935: .Pp
                    936: If
                    937: .Fl t
                    938: is present,
                    939: .Ar key
                    940: is bound in
                    941: .Ar key-table :
                    942: the binding for command mode with
                    943: .Fl c
                    944: or for normal mode without.
                    945: To view the default bindings and possible commands, see the
                    946: .Ic list-keys
                    947: command.
                    948: .It Ic list-keys Op Fl t Ar key-table
                    949: .D1 (alias: Ic lsk )
                    950: List all key bindings.
                    951: Without
                    952: .Fl t
                    953: the primary key bindings - those executed when preceded by the prefix key -
                    954: are printed.
                    955: Keys bound without the prefix key (see
                    956: .Ic bind-key
                    957: .Fl n )
                    958: are enclosed in square brackets.
                    959: .Pp
                    960: With
                    961: .Fl t ,
                    962: the key bindings in
                    963: .Ar key-table
                    964: are listed; this may be one of:
                    965: .Em vi-edit ,
                    966: .Em emacs-edit ,
                    967: .Em vi-choice ,
                    968: .Em emacs-choice ,
                    969: .Em vi-copy
                    970: or
                    971: .Em emacs-copy .
                    972: .It Xo Ic send-keys
1.1       nicm      973: .Op Fl t Ar target-window
1.57      jmc       974: .Ar key Ar ...
1.1       nicm      975: .Xc
1.57      jmc       976: .D1 (alias: Ic send )
                    977: Send a key or keys to a window.
                    978: Each argument
                    979: .Ar key
                    980: is the name of the key (such as
                    981: .Ql C-a
                    982: or
                    983: .Ql npage
                    984: ) to send; if the string is not recognised as a key, it is sent as a series of
                    985: characters.
                    986: All arguments are sent sequentially from first to last.
                    987: .It Ic send-prefix Op Fl t Ar target-window
                    988: Send the prefix key to a window as if it was pressed.
                    989: .It Xo Ic unbind-key
                    990: .Op Fl cn
                    991: .Op Fl t Ar key-table
                    992: .Ar key
1.2       nicm      993: .Xc
1.57      jmc       994: .D1 (alias: Ic unbind )
                    995: Unbind the command bound to
                    996: .Ar key .
                    997: Without
                    998: .Fl t
                    999: the primary key bindings are modified; in this case, if
                   1000: .Fl n
                   1001: is specified, the command bound to
                   1002: .Ar key
                   1003: without a prefix (if any) is removed.
                   1004: .Pp
1.47      nicm     1005: If
1.57      jmc      1006: .Fl t
                   1007: is present,
                   1008: .Ar key
                   1009: in
                   1010: .Ar key-table
                   1011: is unbound: the binding for command mode with
                   1012: .Fl c
                   1013: or for normal mode without.
                   1014: .El
                   1015: .Sh OPTIONS
                   1016: The appearance and behaviour of
                   1017: .Nm
                   1018: may be modified by changing the value of various options.
                   1019: There are two types of option:
                   1020: .Em session options
                   1021: and
                   1022: .Em window options .
                   1023: .Pp
                   1024: Each individual session may have a set of session options, and there is a
                   1025: separate set of global session options.
                   1026: Sessions which do not have a particular option configured inherit the value
                   1027: from the global session options.
                   1028: Session options are set or unset with the
                   1029: .Ic set-option
                   1030: command and may be listed with the
                   1031: .Ic show-options
                   1032: command.
                   1033: The available session options are listed under the
                   1034: .Ic set-option
                   1035: command.
                   1036: .Pp
                   1037: Similarly, a set of window options is attached to each window, and there is
                   1038: a set of global window options from which any unset options are inherited.
                   1039: Window options are altered with the
                   1040: .Ic set-window-option
                   1041: command and can be listed with the
                   1042: .Ic show-window-options
                   1043: command.
                   1044: All window options are documented with the
                   1045: .Ic set-window-option
                   1046: command.
                   1047: .Pp
                   1048: Commands which set options are as follows:
                   1049: .Bl -tag -width Ds
1.1       nicm     1050: .It Xo Ic set-option
1.58      nicm     1051: .Op Fl agu
1.1       nicm     1052: .Op Fl t Ar target-session
                   1053: .Ar option Ar value
                   1054: .Xc
                   1055: .D1 (alias: Ic set )
1.18      nicm     1056: Set a session option.
1.58      nicm     1057: With
                   1058: .Fl a ,
                   1059: and if the option expects a string,
                   1060: .Ar value
                   1061: is appended to the existing setting.
1.1       nicm     1062: If
                   1063: .Fl g
1.18      nicm     1064: is specified, the global session option is set.
1.1       nicm     1065: The
                   1066: .Fl u
                   1067: flag unsets an option, so a session inherits the option from the global
                   1068: options - it is not possible to unset a global option.
                   1069: .Pp
1.18      nicm     1070: Available session options are:
1.1       nicm     1071: .Bl -tag -width Ds
1.69      nicm     1072: .It Ic base-index Ar index
                   1073: Set the base index from which an unused index should be searched when a new
                   1074: window is created.
                   1075: The default is zero.
1.1       nicm     1076: .It Xo Ic bell-action
1.56      jmc      1077: .Op Ic any | none | current
1.1       nicm     1078: .Xc
                   1079: Set action on window bell.
                   1080: .Ic any
                   1081: means a bell in any window linked to a session causes a bell in the current
                   1082: window of that session,
                   1083: .Ic none
                   1084: means all bells are ignored and
                   1085: .Ic current
                   1086: means only bell in windows other than the current window are ignored.
                   1087: .It Ic buffer-limit Ar number
                   1088: Set the number of buffers kept for each session; as new buffers are added to
                   1089: the top of the stack, old ones are removed from the bottom if necessary to
                   1090: maintain this maximum length.
                   1091: .It Ic default-command Ar command
                   1092: Set the command used for new windows (if not specified when the window is
                   1093: created) to
                   1094: .Ar command .
1.19      nicm     1095: The default is an empty string, which instructs
                   1096: .Nm
                   1097: to create a login shell using the
                   1098: .Ev SHELL
                   1099: environment variable or, if it is unset, the user's shell returned by
                   1100: .Xr getpwuid 3 .
1.1       nicm     1101: .It Ic default-path Ar path
                   1102: Set the default working directory for processes created from keys, or
                   1103: interactively from the prompt.
                   1104: The default is the current working directory when the server is started.
1.22      nicm     1105: .It Ic default-terminal Ar terminal
                   1106: Set the default terminal for new windows created in this session - the
                   1107: default value of the
                   1108: .Ev TERM
                   1109: environment variable.
                   1110: For
                   1111: .Nm
                   1112: to work correctly, this
                   1113: .Em must
                   1114: be set to
                   1115: .Ql screen
                   1116: or a derivative of it.
1.21      nicm     1117: .It Ic display-time Ar time
                   1118: Set the amount of time for which status line messages are displayed.
                   1119: .Ar time
                   1120: is in milliseconds.
1.1       nicm     1121: .It Ic history-limit Ar lines
                   1122: Set the maximum number of lines held in window history.
                   1123: This setting applies only to new windows - existing window histories are not
                   1124: resized and retain the limit at the point they were created.
                   1125: .It Ic lock-after-time Ar number
                   1126: Lock the server after
                   1127: .Ar number
                   1128: seconds of inactivity.
                   1129: The default is off (set to 0).
                   1130: This has no effect as a session option; it must be set as a global option using
                   1131: .Fl g .
                   1132: .It Ic message-attr Ar attributes
                   1133: Set status line message attributes, where
                   1134: .Ar attributes
                   1135: is either
                   1136: .Ic default
                   1137: or a comma-delimited list of one or more of:
                   1138: .Ic bright
                   1139: (or
                   1140: .Ic bold ) ,
                   1141: .Ic dim ,
                   1142: .Ic underscore ,
                   1143: .Ic blink ,
                   1144: .Ic reverse ,
                   1145: .Ic hidden ,
                   1146: or
                   1147: .Ic italics .
                   1148: .It Ic message-bg Ar colour
                   1149: Set status line message background colour, where
                   1150: .Ar colour
                   1151: is one of:
                   1152: .Ic black ,
                   1153: .Ic red ,
                   1154: .Ic green ,
                   1155: .Ic yellow ,
                   1156: .Ic blue ,
                   1157: .Ic magenta ,
                   1158: .Ic cyan ,
                   1159: .Ic white
                   1160: or
                   1161: .Ic default .
                   1162: .It Ic message-fg Ar colour
                   1163: Set status line message foreground colour.
                   1164: .It Ic prefix Ar key
                   1165: Set the current prefix key.
1.21      nicm     1166: .It Ic repeat-time Ar time
1.1       nicm     1167: Allow multiple commands to be entered without pressing the prefix-key again
                   1168: in the specified
1.21      nicm     1169: .Ar time
1.1       nicm     1170: milliseconds (the default is 500).
                   1171: Whether a key repeats may be set when it is bound using the
                   1172: .Fl r
                   1173: flag to
                   1174: .Ic bind-key .
1.52      nicm     1175: Repeat is enabled for the default keys bound to the
                   1176: .Ic resize-pane
                   1177: command.
1.1       nicm     1178: .It Xo Ic set-remain-on-exit
1.56      jmc      1179: .Op Ic on | off
1.1       nicm     1180: .Xc
                   1181: Set the
                   1182: .Ic remain-on-exit
                   1183: window option for any windows first created in this session.
                   1184: .It Xo Ic set-titles
1.56      jmc      1185: .Op Ic on | off
1.1       nicm     1186: .Xc
                   1187: Attempt to set the window title using the \ee]2;...\e007 xterm code and
                   1188: the terminal appears to be an xterm.
1.11      nicm     1189: This option is off by default.
1.6       jmc      1190: Note that elinks
1.1       nicm     1191: will only attempt to set the window title if the STY environment
                   1192: variable is set.
                   1193: .It Xo Ic status
1.56      jmc      1194: .Op Ic on | off
1.1       nicm     1195: .Xc
                   1196: Show or hide the status line.
                   1197: .It Ic status-attr Ar attributes
                   1198: Set status line attributes.
                   1199: .It Ic status-bg Ar colour
                   1200: Set status line background colour.
                   1201: .It Ic status-fg Ar colour
                   1202: Set status line foreground colour.
                   1203: .It Ic status-interval Ar interval
                   1204: Update the status bar every
                   1205: .Ar interval
                   1206: seconds.
                   1207: By default, updates will occur every 15 seconds.
                   1208: A setting of zero disables redrawing at interval.
1.41      nicm     1209: .It Xo Ic status-justify
1.56      jmc      1210: .Op Ic left | centre | right
1.41      nicm     1211: .Xc
                   1212: Set the position of the window list component of the status line: left, centre
                   1213: or right justified.
1.1       nicm     1214: .It Xo Ic status-keys
1.56      jmc      1215: .Op Ic vi | emacs
1.1       nicm     1216: .Xc
1.6       jmc      1217: Use vi or emacs-style
1.1       nicm     1218: key bindings in the status line, for example at the command prompt.
                   1219: Defaults to emacs.
                   1220: .It Ic status-left Ar string
                   1221: Display
                   1222: .Ar string
                   1223: to the left of the status bar.
                   1224: .Ar string
                   1225: will be passed through
                   1226: .Xr strftime 3
                   1227: before being used.
                   1228: By default, the session name is shown.
                   1229: .Ar string
                   1230: may contain any of the following special character pairs:
                   1231: .Bl -column "Character pair" "Replaced with" -offset indent
                   1232: .It Sy "Character pair" Ta Sy "Replaced with"
                   1233: .It Li "#(command)" Ta "First line of command's output"
                   1234: .It Li "#H" Ta "Hostname of local host"
1.35      nicm     1235: .It Li "#I" Ta "Current window index"
                   1236: .It Li "#P" Ta "Current pane index"
1.1       nicm     1237: .It Li "#S" Ta "Session name"
                   1238: .It Li "#T" Ta "Current window title"
1.35      nicm     1239: .It Li "#W" Ta "Current window name"
1.1       nicm     1240: .It Li "##" Ta "A literal" Ql #
                   1241: .El
                   1242: .Pp
                   1243: Where appropriate, these may be prefixed with a number to specify the maximum
                   1244: length, for example
                   1245: .Ql #24T .
1.10      nicm     1246: .Pp
1.12      jmc      1247: By default, UTF-8 in
1.10      nicm     1248: .Ar string
                   1249: is not interpreted, to enable UTF-8, use the
                   1250: .Ic status-utf8
                   1251: option.
1.62      nicm     1252: .It Ic status-left-attr Ar attributes
1.66      jmc      1253: Set the attribute of the left part of the status line.
1.62      nicm     1254: .It Ic status-left-fg Ar colour
                   1255: Set the foreground colour of the left part of the status line.
                   1256: .It Ic status-left-bg Ar colour
                   1257: Set the background colour of the left part of the status line.
1.1       nicm     1258: .It Ic status-left-length Ar length
                   1259: Set the maximum
                   1260: .Ar length
                   1261: of the left component of the status bar.
                   1262: The default is 10.
                   1263: .It Ic status-right Ar string
                   1264: Display
                   1265: .Ar string
                   1266: to the right of the status bar.
                   1267: By default, the date and time will be shown.
                   1268: As with
                   1269: .Ic status-left ,
                   1270: .Ar string
                   1271: will be passed to
1.10      nicm     1272: .Xr strftime 3 ,
                   1273: character pairs are replaced, and UTF-8 is dependent on the
                   1274: .Ic status-utf8
                   1275: option.
1.62      nicm     1276: .It Ic status-right-attr Ar attributes
1.66      jmc      1277: Set the attribute of the right part of the status line.
1.62      nicm     1278: .It Ic status-right-fg Ar colour
                   1279: Set the foreground colour of the right part of the status line.
                   1280: .It Ic status-right-bg Ar colour
                   1281: Set the background colour of the right part of the status line.
1.1       nicm     1282: .It Ic status-right-length Ar length
                   1283: Set the maximum
                   1284: .Ar length
                   1285: of the right component of the status bar.
                   1286: The default is 40.
1.10      nicm     1287: .Pp
                   1288: .It Xo Ic status-utf8
1.56      jmc      1289: .Op Ic on | off
1.10      nicm     1290: .Xc
                   1291: Instruct
                   1292: .Nm
                   1293: to treat top-bit-set characters in the
                   1294: .Ic status-left
                   1295: and
                   1296: .Ic status-right
                   1297: strings as UTF-8; notably, this is important for wide characters.
                   1298: This option defaults to off.
1.55      jmc      1299: .It Ic terminal-overrides Ar string
1.54      nicm     1300: Contains a list of entries which override terminal descriptions read using
                   1301: .Xr terminfo 5 .
                   1302: .Ar string
                   1303: is a comma-separated list of items each a colon-separated string made up of a
                   1304: terminal type pattern (matched using
                   1305: .Xr fnmatch 3 )
                   1306: and a set of
                   1307: .Em name=value
                   1308: entries.
                   1309: .Pp
                   1310: For example, to set the
                   1311: .Ql clear
                   1312: .Xr terminfo 5
                   1313: entry to
                   1314: .Ql \ee[H\ee[2J
                   1315: for all terminal types and the
                   1316: .Ql dch1
                   1317: entry to
                   1318: .Ql \ee[P
1.55      jmc      1319: for the
1.54      nicm     1320: .Ql rxvt
                   1321: terminal type, the option could be set to the string:
                   1322: .Bd -literal -offset indent
                   1323: "*:clear=\ee[H\ee[2J,rxvt:dch1=\ee[P"
                   1324: .Ed
                   1325: .Pp
                   1326: The terminal entry value is passed through
                   1327: .Xr strunvis 3
                   1328: before interpretation.
                   1329: The default value forcibly corrects the
                   1330: .Ql colors
                   1331: entry for terminals which support 88 or 256 colours:
                   1332: .Bd -literal -offset indent
                   1333: "*88col*:colors=88,*256col*:colors=256"
                   1334: .Ed
1.63      nicm     1335: .It Ic update-environment Ar variables
                   1336: Set a space-separated string containing a list of environment variables to be
                   1337: copied into the session environment when a new session is created or an
                   1338: existing session is attached.
                   1339: Any variables that do not exist in the source environment are set to be
                   1340: removed from the session environment (as if
                   1341: .Fl r
                   1342: was given to the
                   1343: .Ic set-environment
                   1344: command).
                   1345: The default is
                   1346: .Ev DISPLAY .
1.37      nicm     1347: .It Xo Ic visual-activity
1.56      jmc      1348: .Op Ic on | off
1.37      nicm     1349: .Xc
                   1350: If on, display a status line message when activity occurs in a window
1.39      jmc      1351: for which the
1.37      nicm     1352: .Ic monitor-activity
                   1353: window option is enabled.
                   1354: .It Xo Ic visual-bell
1.56      jmc      1355: .Op Ic on | off
1.37      nicm     1356: .Xc
                   1357: If this option is on, a message is shown on a bell instead of it being passed
                   1358: through to the terminal (which normally makes a sound).
                   1359: Also see the
                   1360: .Ic bell-action
                   1361: option.
                   1362: .It Xo Ic visual-content
1.56      jmc      1363: .Op Ic on | off
1.37      nicm     1364: .Xc
                   1365: Like
                   1366: .Ic visual-activity ,
                   1367: display a message when content is present in a window
1.39      jmc      1368: for which the
1.37      nicm     1369: .Ic monitor-content
                   1370: window option is enabled.
1.1       nicm     1371: .El
                   1372: .It Xo Ic set-window-option
1.58      nicm     1373: .Op Fl agu
1.1       nicm     1374: .Op Fl t Ar target-window
                   1375: .Ar option Ar value
                   1376: .Xc
                   1377: .D1 (alias: Ic setw )
1.18      nicm     1378: Set a window option.
1.1       nicm     1379: The
1.58      nicm     1380: .Fl a ,
1.1       nicm     1381: .Fl g
                   1382: and
                   1383: .Fl u
                   1384: flags work similarly to the
                   1385: .Ic set-option
                   1386: command.
                   1387: .Pp
1.18      nicm     1388: Supported window options are:
1.56      jmc      1389: .Pp
                   1390: .Bl -tag -width Ds -compact
1.1       nicm     1391: .It Xo Ic aggressive-resize
1.56      jmc      1392: .Op Ic on | off
1.1       nicm     1393: .Xc
                   1394: Aggressively resize the chosen window.
                   1395: This means that
                   1396: .Nm
                   1397: will resize the window to the size of the smallest session for which it is the
                   1398: current window, rather than the smallest session to which it is attached.
                   1399: The window may resize when the current window is changed on another sessions;
1.6       jmc      1400: this option is good for full-screen programs which support
                   1401: .Dv SIGWINCH
                   1402: and poor for interactive programs such as shells.
1.56      jmc      1403: .Pp
1.1       nicm     1404: .It Xo Ic automatic-rename
1.56      jmc      1405: .Op Ic on | off
1.1       nicm     1406: .Xc
                   1407: Control automatic window renaming.
                   1408: When this setting is enabled,
                   1409: .Nm
                   1410: will attempt - on supported platforms - to rename the window to reflect the
                   1411: command currently running in it.
                   1412: This flag is automatically disabled for an individual window when a name
                   1413: is specified at creation with
                   1414: .Ic new-window or
                   1415: .Ic new-session ,
                   1416: or later with
                   1417: .Ic rename-window .
                   1418: It may be switched off globally with:
                   1419: .Bd -literal -offset indent
                   1420: set-window-option -g automatic-rename off
                   1421: .Ed
1.56      jmc      1422: .Pp
1.1       nicm     1423: .It Ic clock-mode-colour Ar colour
                   1424: Set clock colour.
1.56      jmc      1425: .Pp
1.1       nicm     1426: .It Xo Ic clock-mode-style
1.56      jmc      1427: .Op Ic 12 | 24
1.1       nicm     1428: .Xc
                   1429: Set clock hour format.
1.56      jmc      1430: .Pp
1.1       nicm     1431: .It Ic force-height Ar height
                   1432: .It Ic force-width Ar width
                   1433: Prevent
                   1434: .Nm
                   1435: from resizing a window to greater than
                   1436: .Ar width
                   1437: or
                   1438: .Ar height .
                   1439: A value of zero restores the default unlimited setting.
1.56      jmc      1440: .Pp
1.2       nicm     1441: .It Ic main-pane-width Ar width
                   1442: .It Ic main-pane-height Ar height
                   1443: Set the width or height of the main (left or top) pane in the
                   1444: .Ic main-horizontal
                   1445: or
                   1446: .Ic main-vertical
                   1447: layouts.
1.56      jmc      1448: .Pp
1.1       nicm     1449: .It Ic mode-attr Ar attributes
                   1450: Set window modes attributes.
1.56      jmc      1451: .Pp
1.1       nicm     1452: .It Ic mode-bg Ar colour
                   1453: Set window modes background colour.
1.56      jmc      1454: .Pp
1.1       nicm     1455: .It Ic mode-fg Ar colour
                   1456: Set window modes foreground colour.
1.56      jmc      1457: .Pp
1.1       nicm     1458: .It Xo Ic mode-keys
1.56      jmc      1459: .Op Ic vi | emacs
1.1       nicm     1460: .Xc
1.50      nicm     1461: Use vi or emacs-style key bindings in scroll, copy and choice modes.
1.1       nicm     1462: Key bindings default to emacs.
1.56      jmc      1463: .Pp
1.50      nicm     1464: .It Xo Ic mode-mouse
1.56      jmc      1465: .Op Ic on | off
1.50      nicm     1466: .Xc
1.51      jmc      1467: Mouse state in modes.
                   1468: If on,
1.50      nicm     1469: .Nm
                   1470: will respond to mouse clicks by moving the cursor in copy mode or selecting an
                   1471: option in choice mode.
1.56      jmc      1472: .Pp
1.1       nicm     1473: .It Xo Ic monitor-activity
1.56      jmc      1474: .Op Ic on | off
1.1       nicm     1475: .Xc
                   1476: Monitor for activity in the window.
                   1477: Windows with activity are highlighted in the status line.
1.56      jmc      1478: .Pp
                   1479: .It Ic monitor-content Ar match-string
1.6       jmc      1480: Monitor content in the window.
                   1481: When
1.16      nicm     1482: .Xr fnmatch 3
                   1483: pattern
1.1       nicm     1484: .Ar match-string
                   1485: appears in the window, it is highlighted in the status line.
1.56      jmc      1486: .Pp
1.1       nicm     1487: .It Xo Ic remain-on-exit
1.56      jmc      1488: .Op Ic on | off
1.1       nicm     1489: .Xc
                   1490: A window with this flag set is not destroyed when the program running in it
                   1491: exits.
                   1492: The window may be reactivated with the
                   1493: .Ic respawn-window
                   1494: command.
1.56      jmc      1495: .Pp
1.1       nicm     1496: .It Xo Ic utf8
1.56      jmc      1497: .Op Ic on | off
1.1       nicm     1498: .Xc
                   1499: Instructs
                   1500: .Nm
                   1501: to expect UTF-8 sequences to appear in this window.
1.56      jmc      1502: .Pp
1.1       nicm     1503: .It Ic window-status-attr Ar attributes
                   1504: Set status line attributes for a single window.
1.56      jmc      1505: .Pp
1.1       nicm     1506: .It Ic window-status-bg Ar colour
                   1507: Set status line background colour for a single window.
1.56      jmc      1508: .Pp
1.1       nicm     1509: .It Ic window-status-fg Ar colour
                   1510: Set status line foreground colour for a single window.
1.56      jmc      1511: .Pp
1.40      nicm     1512: .It Ic window-status-current-attr Ar attributes
                   1513: Set status line attributes for the currently active window.
1.56      jmc      1514: .Pp
1.40      nicm     1515: .It Ic window-status-current-bg Ar colour
                   1516: Set status line background colour for the currently active window.
1.56      jmc      1517: .Pp
1.40      nicm     1518: .It Ic window-status-current-fg Ar colour
                   1519: Set status line foreground colour for the currently active window.
1.56      jmc      1520: .Pp
1.1       nicm     1521: .It Xo Ic xterm-keys
1.56      jmc      1522: .Op Ic on | off
1.1       nicm     1523: .Xc
                   1524: If this option is set,
                   1525: .Nm
                   1526: will generate
1.57      jmc      1527: .Xr xterm 1 -style
                   1528: function key sequences; these have a number included to indicate modifiers such
                   1529: as Shift, Alt or Ctrl.
                   1530: .El
                   1531: .It Xo Ic show-options
                   1532: .Op Fl g
                   1533: .Op Fl t Ar target-session
                   1534: .Xc
                   1535: .D1 (alias: Ic show )
                   1536: Show the session options for
                   1537: .Ar target session ,
                   1538: or the global session options with
                   1539: .Fl g .
                   1540: .It Xo Ic show-window-options
                   1541: .Op Fl g
                   1542: .Op Fl t Ar target-window
                   1543: .Xc
                   1544: .D1 (alias: Ic showw )
                   1545: List the window options for
                   1546: .Ar target-window ,
                   1547: or the global window options if
                   1548: .Fl g
                   1549: is used.
1.63      nicm     1550: .El
                   1551: .Sh ENVIRONMENT
                   1552: When the server is started,
                   1553: .Nm
                   1554: copies the environment into the
                   1555: .Em global environment ;
                   1556: in addition, each session has a
                   1557: .Em session environment .
                   1558: When a window is created, the session and global environments are merged with
                   1559: the session environment overriding any variable present in both.
                   1560: This is the initial environment passed to the new process.
                   1561: .Pp
                   1562: The
                   1563: .Ic update-environment
                   1564: session option may be used to update the session environment from the client
                   1565: when a new session is created or an old reattached.
                   1566: .Nm
                   1567: also initialises the
                   1568: .Ev TMUX
                   1569: variable with some internal information to allow commands to be executed
                   1570: from inside, and the
                   1571: .Ev TERM
                   1572: variable with the correct terminal setting of
                   1573: .Ql screen .
                   1574: .Pp
                   1575: Commands to alter and view the environment are:
                   1576: .Bl -tag -width Ds
                   1577: .It Xo Ic set-environment
                   1578: .Op Fl gru
                   1579: .Op Fl t Ar target-session
                   1580: .Ar name Op Ar value
                   1581: .Xc
                   1582: Set or unset an environment variable.
                   1583: If
                   1584: .Fl g
                   1585: is used, the change is made in the global environment; otherwise, it is applied
                   1586: to the session environment for
                   1587: .Ar target-session .
                   1588: The
                   1589: .Fl u
                   1590: flag unsets a variable.
                   1591: .Fl r
                   1592: indicates the variable is to be removed from the environment before starting a
                   1593: new process.
                   1594: .It Xo Ic show-environment
                   1595: .Op Fl g
                   1596: .Op Fl t Ar target-session
                   1597: .Xc
                   1598: Display the environment for
                   1599: .Ar target-session
                   1600: or the global environment with
                   1601: .Fl g .
                   1602: Variables removed from the environment are prefixed with
                   1603: .Ql - .
1.57      jmc      1604: .El
                   1605: .Sh STATUS LINE
                   1606: .Nm
                   1607: includes an optional status line which is displayed in the bottom line of each
                   1608: terminal.
                   1609: By default, the status line is enabled (it may be disabled with the
                   1610: .Ic status
                   1611: session option) and contains, from left-to-right: the name of the current
                   1612: session in square brackets; the window list; the current window title in double
                   1613: quotes; and the time and date.
                   1614: .Pp
                   1615: The status line is made of three parts: configurable left and right sections
                   1616: (which may contain dynamic content such as the time or output from a shell
                   1617: command, see the
                   1618: .Ic status-left ,
                   1619: .Ic status-left-length ,
                   1620: .Ic status-right ,
                   1621: and
                   1622: .Ic status-right-length
                   1623: options below), and a central window list.
                   1624: The window list shows the index, name and (if any) flag of the windows
                   1625: present in the current session in ascending numerical order.
                   1626: The flag is one of the following symbols appended to the window name:
                   1627: .Bl -column "Symbol" "Meaning" -offset indent
                   1628: .It Sy "Symbol" Ta Sy "Meaning"
                   1629: .It Li "*" Ta "Denotes the current window."
                   1630: .It Li "-" Ta "Marks the last window (previously selected)."
                   1631: .It Li "#" Ta "Window is monitored and activity has been detected."
                   1632: .It Li "!" Ta "A bell has occurred in the window."
                   1633: .It Li "+" Ta "Window is monitored for content and it has appeared."
                   1634: .El
                   1635: .Pp
                   1636: The # symbol relates to the
                   1637: .Ic monitor-activity
                   1638: and + to the
                   1639: .Ic monitor-content
                   1640: window options.
                   1641: The window name is printed in inverted colours if an alert (bell, activity or
                   1642: content) is present.
                   1643: .Pp
                   1644: The colour and attributes of the status line may be configured, the entire status line using
                   1645: the
                   1646: .Ic status-attr ,
                   1647: .Ic status-fg
                   1648: and
                   1649: .Ic status-bg
                   1650: session options and individual windows using the
                   1651: .Ic window-status-attr ,
                   1652: .Ic window-status-fg
                   1653: and
                   1654: .Ic window-status-bg
                   1655: window options.
                   1656: .Pp
                   1657: The status line is automatically refreshed at interval if it has changed, the interval may be
                   1658: controlled with the
                   1659: .Ic status-interval
                   1660: session option.
                   1661: .Pp
                   1662: Commands related to the status line are as follows:
                   1663: .Bl -tag -width Ds
                   1664: .It Xo Ic command-prompt
                   1665: .Op Fl t Ar target-client
                   1666: .Op Ar template
                   1667: .Xc
                   1668: Open the command prompt in a client.
                   1669: This may be used from inside
                   1670: .Nm
                   1671: to execute commands interactively.
                   1672: If
                   1673: .Ar template
                   1674: is specified, it is used as the command; any %% in the template will be
                   1675: replaced by what is entered at the prompt.
                   1676: .It Xo Ic confirm-before
                   1677: .Op Fl t Ar target-client
                   1678: .Ar command
                   1679: .Xc
                   1680: .D1 (alias: Ic confirm )
                   1681: Ask for confirmation before executing
                   1682: .Ar command .
                   1683: This command works only from inside
                   1684: .Nm .
                   1685: .It Xo Ic display-message
                   1686: .Op Fl t Ar target-client
                   1687: .Op Ar message
                   1688: .Xc
                   1689: .D1 (alias: Ic display )
                   1690: Display a message (see the
                   1691: .Ic status-left
                   1692: option below)
                   1693: in the status line.
                   1694: .It Ic select-prompt Op Fl t Ar target-client
                   1695: Open a prompt inside
                   1696: .Ar target-client
                   1697: allowing a window index to be entered interactively.
                   1698: .El
                   1699: .Sh BUFFERS
                   1700: .Nm
                   1701: maintains a stack of
                   1702: .Em paste buffers
                   1703: for each session.
                   1704: Up to the value of the
                   1705: .Ic buffer-limit
                   1706: option are kept; when a new buffer is added, the buffer at the bottom of the
                   1707: stack is removed.
                   1708: Buffers may be added using
                   1709: .Ic copy-mode
                   1710: or the
                   1711: .Ic set-buffer
                   1712: command, and pasted into a window using the
                   1713: .Ic paste-buffer
                   1714: command.
                   1715: .Pp
                   1716: A configurable history buffer is also maintained for each window.
                   1717: By default, up to 2000 lines are kept; this can be altered with the
                   1718: .Ic history-limit
                   1719: option (see the
                   1720: .Ic set-option
                   1721: command above).
                   1722: .Pp
                   1723: The buffer commands are as follows:
                   1724: .Bl -tag -width Ds
                   1725: .It Ic clear-history Op Fl t Ar target-pane
                   1726: .D1 (alias: Ic clearhist )
                   1727: Remove and free the history for the specified pane.
                   1728: .It Xo Ic copy-buffer
                   1729: .Op Fl a Ar src-index
                   1730: .Op Fl b Ar dst-index
                   1731: .Op Fl s Ar src-session
                   1732: .Op Fl t Ar dst-session
                   1733: .Xc
                   1734: .D1 (alias: Ic copyb )
                   1735: Copy a session paste buffer to another session.
                   1736: If no sessions are specified, the current one is used instead.
                   1737: .It Xo Ic delete-buffer
                   1738: .Op Fl b Ar buffer-index
                   1739: .Op Fl t Ar target-session
                   1740: .Xc
                   1741: .D1 (alias: Ic deleteb )
                   1742: Delete the buffer at
                   1743: .Ar buffer-index ,
                   1744: or the top buffer if not specified.
                   1745: .It Ic list-buffers Op Fl t Ar target-session
                   1746: .D1 (alias: Ic lsb )
                   1747: List the buffers in the given session.
                   1748: .It Xo Ic load-buffer
                   1749: .Op Fl b Ar buffer-index
                   1750: .Op Fl t Ar target-session
                   1751: .Ar path
                   1752: .Xc
                   1753: .D1 (alias: Ic loadb )
                   1754: Load the contents of the specified paste buffer from
                   1755: .Ar path .
                   1756: .It Xo Ic paste-buffer
                   1757: .Op Fl dr
                   1758: .Op Fl b Ar buffer-index
                   1759: .Op Fl t Ar target-window
                   1760: .Xc
                   1761: .D1 (alias: Ic pasteb )
                   1762: Insert the contents of a paste buffer into the current window.
                   1763: With
                   1764: .Fl d ,
                   1765: also delete the paste buffer from the stack.
                   1766: When output, any linefeed (LF) characters in the paste buffer are replaced with
                   1767: carriage returns (CR).
                   1768: This translation may be disabled with the
                   1769: .Fl r
                   1770: flag.
                   1771: .It Xo Ic save-buffer
                   1772: .Op Fl a
                   1773: .Op Fl b Ar buffer-index
                   1774: .Op Fl t Ar target-session
                   1775: .Ar path
                   1776: .Xc
                   1777: .D1 (alias: Ic saveb )
                   1778: Save the contents of the specified paste buffer to
                   1779: .Ar path .
                   1780: The
                   1781: .Fl a
                   1782: option appends to rather than overwriting the file.
                   1783: .It Xo Ic set-buffer
                   1784: .Op Fl b Ar buffer-index
                   1785: .Op Fl t Ar target-session
                   1786: .Ar data
                   1787: .Xc
                   1788: .D1 (alias: Ic setb )
                   1789: Set the contents of the specified buffer to
                   1790: .Ar data .
1.1       nicm     1791: .It Xo Ic show-buffer
                   1792: .Op Fl b Ar buffer-index
                   1793: .Op Fl t Ar target-session
                   1794: .Xc
                   1795: .D1 (alias: Ic showb )
                   1796: Display the contents of the specified buffer.
1.57      jmc      1797: .El
                   1798: .Sh MISCELLANEOUS
                   1799: .Pp
                   1800: Miscellaneous commands are as follows:
                   1801: .Bl -tag -width Ds
                   1802: .It Ic clock-mode Op Fl t Ar target-window
                   1803: Display a large clock.
                   1804: .It Ic if-shell Ar shell-command command
                   1805: .D1 (alias: Ic if )
                   1806: Execute
                   1807: .Ar command
                   1808: if
                   1809: .Ar shell-command
                   1810: returns success.
                   1811: .It Ic lock-server
                   1812: .D1 (alias: Ic lock )
                   1813: Lock the server until a password is entered.
                   1814: .It Ic server-info
                   1815: .D1 (alias: Ic info )
                   1816: Show server information and terminal details.
                   1817: .It Xo Ic set-password
                   1818: .Op Fl c
                   1819: .Ar password
1.1       nicm     1820: .Xc
1.57      jmc      1821: .D1 (alias: Ic pass )
                   1822: Set the server password.
                   1823: If the
1.49      nicm     1824: .Fl c
1.57      jmc      1825: option is given, a pre-encrypted password may be specified.
                   1826: By default, the password is blank, thus any entered password will be accepted
                   1827: when unlocking the server (see the
                   1828: .Ic lock-server
                   1829: command).
                   1830: To prevent variable expansion when an encrypted password is read from a
                   1831: configuration file, enclose it in single quotes (').
1.1       nicm     1832: .El
                   1833: .Sh FILES
1.26      nicm     1834: .Bl -tag -width "/etc/tmux.confXXX" -compact
1.1       nicm     1835: .It Pa ~/.tmux.conf
1.6       jmc      1836: Default
1.1       nicm     1837: .Nm
1.6       jmc      1838: configuration file.
1.26      nicm     1839: .It Pa /etc/tmux.conf
                   1840: System-wide configuration file.
1.1       nicm     1841: .El
1.57      jmc      1842: .Sh EXAMPLES
                   1843: To create a new
                   1844: .Nm
                   1845: session running
                   1846: .Xr vi 1 :
                   1847: .Pp
                   1848: .Dl $ tmux new-session vi
                   1849: .Pp
                   1850: Most commands have a shorter form, known as an alias.
                   1851: For new-session, this is
                   1852: .Ic new :
                   1853: .Pp
                   1854: .Dl $ tmux new vi
                   1855: .Pp
                   1856: Alternatively, the shortest unambiguous form of a command is accepted.
                   1857: If there are several options, they are listed:
                   1858: .Bd -literal -offset indent
                   1859: $ tmux n
                   1860: ambiguous command: n, could be: new-session, new-window, next-window
                   1861: .Ed
                   1862: .Pp
                   1863: Within an active session, a new window may be created by typing
                   1864: .Ql C-b c
                   1865: (Ctrl
                   1866: followed by the
                   1867: .Ql b
                   1868: key
                   1869: followed by the
                   1870: .Ql c
                   1871: key).
                   1872: .Pp
                   1873: Windows may be navigated with:
                   1874: .Ql C-b 0
                   1875: (to select window 0),
                   1876: .Ql C-b 1
                   1877: (to select window 1), and so on;
                   1878: .Ql C-b n
                   1879: to select the next window; and
                   1880: .Ql C-b p
                   1881: to select the previous window.
                   1882: .Pp
                   1883: A session may be detached using
                   1884: .Ql C-b d
1.64      nicm     1885: (or by an external event such as
                   1886: .Xr ssh 1
                   1887: disconnection) and reattached with:
1.57      jmc      1888: .Pp
                   1889: .Dl $ tmux attach-session
                   1890: .Pp
                   1891: Typing
                   1892: .Ql C-b \&?
                   1893: lists the current key bindings in the current window; up and down may be used
                   1894: to navigate the list or
                   1895: .Ql q
                   1896: to exit from it.
                   1897: .Pp
                   1898: Commands to be run when the
                   1899: .Nm
                   1900: server is started may be placed in the
                   1901: .Pa ~/.tmux.conf
                   1902: configuration file.
                   1903: Common examples include:
                   1904: .Pp
                   1905: Changing the default prefix key:
                   1906: .Bd -literal -offset indent
                   1907: set-option -g prefix C-a
                   1908: unbind-key C-b
                   1909: bind-key C-a send-prefix
                   1910: .Ed
                   1911: .Pp
                   1912: Turning the status line off, or changing its colour:
                   1913: .Bd -literal -offset indent
                   1914: set-option -g status off
                   1915: set-option -g status-bg blue
                   1916: .Ed
                   1917: .Pp
                   1918: Setting other options, such as the default command,
                   1919: or locking after 30 minutes of inactivity:
                   1920: .Bd -literal -offset indent
                   1921: set-option -g default-command "exec /bin/ksh"
                   1922: set-option -g lock-after-time 1800
                   1923: .Ed
                   1924: .Pp
                   1925: Creating new key bindings:
                   1926: .Bd -literal -offset indent
                   1927: bind-key b set-option status
                   1928: bind-key / command-prompt "split-window 'exec man %%'"
                   1929: .Ed
1.1       nicm     1930: .Sh SEE ALSO
                   1931: .Xr pty 4
                   1932: .Sh AUTHORS
                   1933: .An Nicholas Marriott Aq nicm@users.sourceforge.net