[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.30

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