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

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