Annotation of src/usr.bin/tmux/tmux.cat1, Revision 1.1
1.1 ! nicm 1: TMUX(1) OpenBSD Reference Manual TMUX(1)
! 2:
! 3: NNAAMMEE
! 4: ttmmuuxx - terminal multiplexer
! 5:
! 6: SSYYNNOOPPSSIISS
! 7: ttmmuuxx [--2288ddqqUUuuvv] [--ff _f_i_l_e] [--LL _s_o_c_k_e_t_-_n_a_m_e] [--SS _s_o_c_k_e_t_-_p_a_t_h]
! 8: [_c_o_m_m_a_n_d [_f_l_a_g_s]]
! 9:
! 10: DDEESSCCRRIIPPTTIIOONN
! 11: ttmmuuxx is a terminal multiplexer; it enables a number of terminals to be
! 12: accessed and controlled from a single terminal.
! 13:
! 14: ttmmuuxx runs as a server-client system. A server is created automatically
! 15: when necessary and holds a number of _s_e_s_s_i_o_n_s, each of which may have a
! 16: number of _w_i_n_d_o_w_s linked to it. A window may be split on screen into one
! 17: or more _p_a_n_e_s, each of which is a separate terminal. Any number of
! 18: _c_l_i_e_n_t_s may connect to a session, or the server may be controlled by is-
! 19: suing commands with ttmmuuxx. Communication takes place through a socket, by
! 20: default placed in _/_t_m_p.
! 21:
! 22: The options are as follows:
! 23:
! 24: --22 Force ttmmuuxx to assume the terminal supports 256 colours.
! 25:
! 26: --88 Like --22, indicates the terminal supports 88 colours.
! 27:
! 28: --dd Force ttmmuuxx to assume the terminal supports default colours.
! 29:
! 30: --ff _f_i_l_e Specify an alternative configuration file. By default,
! 31: ttmmuuxx will look for a config file at _~_/_._t_m_u_x_._c_o_n_f. The con-
! 32: figuration file is a set of ttmmuuxx commands which are execut-
! 33: ed in sequence when the server is first started.
! 34:
! 35: --qq Prevent the server sending various information messages,
! 36: for example when window flags are altered.
! 37:
! 38: --LL _s_o_c_k_e_t_-_n_a_m_e
! 39: ttmmuuxx stores the server socket in a directory under _/_t_m_p;
! 40: the default socket is named _d_e_f_a_u_l_t. This option allows a
! 41: different socket name to be specified, allowing several in-
! 42: dependent ttmmuuxx servers to be run. Unlike --SS a full path is
! 43: not necessary: the sockets are all created in the same di-
! 44: rectory.
! 45:
! 46: --SS _s_o_c_k_e_t_-_p_a_t_h
! 47: Specify a full alternative path to the server socket. If
! 48: --SS is specified, the default socket directory is not used
! 49: and any --LL flag is ignored.
! 50:
! 51: --UU Unlock the server.
! 52:
! 53: --uu Instruct ttmmuuxx that the terminal support UTF-8.
! 54:
! 55: --vv Request verbose logging. This option may be specified mul-
! 56: tiple times for increasing verbosity. Log messages will be
! 57: saved into _t_m_u_x_-_c_l_i_e_n_t_-_P_I_D_._l_o_g and _t_m_u_x_-_s_e_r_v_e_r_-_P_I_D_._l_o_g
! 58: files in the current directory, where _P_I_D is the pid of the
! 59: server or client process.
! 60:
! 61: _c_o_m_m_a_n_d [_f_l_a_g_s]
! 62: This specifies one of a set of commands used to control
! 63: ttmmuuxx, and described in the following sections. If no com-
! 64: mand and flags is specified, the nneeww--sseessssiioonn command is as-
! 65: sumed.
! 66:
! 67: QQUUIICCKK SSTTAARRTT
! 68: To create a new tmux session running vi(1):
! 69:
! 70: $ tmux new-session vi
! 71:
! 72: Most commands have a shorter form, known as an alias. For new-session,
! 73: this is nneeww:
! 74:
! 75: $ tmux new vi
! 76:
! 77: Alternatively, the shortest unambiguous form of a command is accepted.
! 78: If there are several options, they are listed:
! 79:
! 80: $ tmux n
! 81: ambiguous command: n, could be: new-session, new-window, next-window
! 82: $
! 83:
! 84: Within an active session, a new window may be created by typing `C-b'
! 85: (ctrl-b, known as the prefix key) followed by the `c' key.
! 86:
! 87: Windows may be navigated with: `C-b 0' (to select window 0), `C-b 1' (to
! 88: select window 1), and so on; `C-b n' to select the next window; and `C-b
! 89: p' to select the previous window.
! 90:
! 91: A session may be detached using `C-b d' and reattached with:
! 92:
! 93: $ tmux attach-session
! 94:
! 95: Typing `C-b ?' lists the current key bindings in the current window; up
! 96: and down may be used to navigate the list or `Q' to exit from it.
! 97:
! 98: KKEEYY BBIINNDDIINNGGSS
! 99: ttmmuuxx may be controlled from an attached client by using a key combination
! 100: of a prefix key, `C-b' (ctrl-b) by default, followed by a command key.
! 101:
! 102: Some of the default key bindings include:
! 103:
! 104: `d' Detach current client.
! 105: `c' Create new window.
! 106: `n' Change to next window in the current session.
! 107: `p' Change to previous window in the current session.
! 108: `l' Move to last (previously selected) window in the current session.
! 109: `t' Display a large clock.
! 110: `?' List current key bindings.
! 111:
! 112: A complete list may be obtained with the lliisstt--kkeeyyss command (bound to `?'
! 113: by default). Key bindings may be changed with the bbiinndd--kkeeyy and uunnbbiinndd--
! 114: kkeeyy commands.
! 115:
! 116: HHIISSTTOORRYY
! 117: ttmmuuxx maintains a configurable history buffer for each window. By de-
! 118: fault, up to 2000 lines are kept, this can be altered with the hhiissttoorryy--
! 119: lliimmiitt option (see the sseett--ooppttiioonn command below).
! 120:
! 121: MMOODDEESS
! 122: A ttmmuuxx window may be in one of several modes. The default permits direct
! 123: access to the terminal attached to the window. The others are:
! 124:
! 125: _o_u_t_p_u_t _m_o_d_e
! 126: This is entered when a command which produces output, such as
! 127: lliisstt--kkeeyyss, is executed from a key binding.
! 128:
! 129: _s_c_r_o_l_l _m_o_d_e
! 130: This is entered with the ssccrroollll--mmooddee command (bound to `=' by de-
! 131: fault) and permits the window history buffer to be inspected.
! 132:
! 133: _c_o_p_y _m_o_d_e
! 134: This permits a section of a window or its history to be copied to
! 135: a _p_a_s_t_e _b_u_f_f_e_r for later insertion into another window. This
! 136: mode is entered with the ccooppyy--mmooddee command, bound to `[' by de-
! 137: fault.
! 138:
! 139: The keys available depend on whether emacs(1) or vi(1) mode is selected
! 140: (see the mmooddee--kkeeyyss option). The following keys are supported as appro-
! 141: priate for the mode:
! 142:
! 143: FFuunnccttiioonn vvii eemmaaccss
! 144: Start of line 0 or ^ C-a
! 145: Clear selection Escape C-g
! 146: Copy selection Enter M-w
! 147: Cursor down j Down
! 148: End of line $ C-e
! 149: Cursor left h Left
! 150: Next page C-f Page down
! 151: Next word w M-f
! 152: Previous page C-u Page up
! 153: Previous word b M-b
! 154: Quit mode q Escape
! 155: Cursor right l Right
! 156: Start selection Space C-Space
! 157: Cursor up k Up
! 158:
! 159: BBUUFFFFEERRSS
! 160: ttmmuuxx maintains a stack of _p_a_s_t_e _b_u_f_f_e_r_s for each session. Up to the val-
! 161: ue of the bbuuffffeerr--lliimmiitt option are kept; when a new buffer is added, the
! 162: buffer at the bottom of the stack is removed. Buffers may be added using
! 163: ccooppyy--mmooddee or the sseett--bbuuffffeerr command, and pasted into a window using the
! 164: ppaassttee--bbuuffffeerr command.
! 165:
! 166: PPAANNEESS AANNDD LLAAYYOOUUTTSS
! 167: Each window displayed by ttmmuuxx may be split into one or more _p_a_n_e_s; each
! 168: pane takes up a certain area of the display and is a separate terminal.
! 169: A window may be split into panes using the sspplliitt--wwiinnddooww command.
! 170:
! 171: Panes are numbered beginning from zero; in horizontal layouts zero is the
! 172: leftmost pane and in vertical the topmost.
! 173:
! 174: Panes may be arranged using several layouts. The layout may be cycled
! 175: with the nneexxtt--llaayyoouutt command (bound to `C-space' by default), the current
! 176: pane may be changed with the uupp--ppaannee and ddoowwnn--ppaannee commands and the
! 177: rroottaattee--wwiinnddooww and sswwaapp--ppaannee commands may be used to swap panes without
! 178: changing the window layout.
! 179:
! 180: The following layouts are supported:
! 181:
! 182: mmaannuuaall Manual layout splits windows vertically (running across); only
! 183: with this layout may panes be resized using the rreessiizzee--ppaannee com-
! 184: mand.
! 185:
! 186: aaccttiivvee--oonnllyy
! 187: Only the active pane is shown - all other panes are hidden.
! 188:
! 189: eevveenn--hhoorriizzoonnttaall
! 190: Panes are spread out evenly from left to right across the window.
! 191:
! 192: eevveenn--vveerrttiiccaall
! 193: Panes are spread evenly from top to bottom.
! 194:
! 195: mmaaiinn--vveerrttiiccaall
! 196: A large (81 column) pane is shown on the left of the window and
! 197: the remaining panes are spread from top to bottom in the leftover
! 198: space to the right.
! 199:
! 200: CCOOMMMMAANNDDSS
! 201: This section contains a list of the commands supported by ttmmuuxx. Most
! 202: commands accept the optional --tt argument with one of _t_a_r_g_e_t_-_c_l_i_e_n_t,
! 203: _t_a_r_g_e_t_-_s_e_s_s_i_o_n or _t_a_r_g_e_t_-_w_i_n_d_o_w. These specify the client, session or
! 204: window which a command should affect. _t_a_r_g_e_t_-_c_l_i_e_n_t is the name of the
! 205: pty(4) file to which the client is connected, for example _/_d_e_v_/_t_t_y_p_1.
! 206: Clients may be listed with the lliisstt--cclliieennttss command.
! 207:
! 208: _t_a_r_g_e_t_-_s_e_s_s_i_o_n is either the name of a session (as listed by the lliisstt--
! 209: sseessssiioonnss command); or the name of a client as for _t_a_r_g_e_t_-_c_l_i_e_n_t, in this
! 210: case, the session attached to the client is used. An fnmatch(3) pattern
! 211: may be used to match the session name. If a session is omitted when re-
! 212: quired, ttmmuuxx attempts to use the current session; if no current session
! 213: is available, the most recently created is chosen. If no client is spec-
! 214: ified, the current client is chosen, if possible, or an error is report-
! 215: ed.
! 216:
! 217: _t_a_r_g_e_t_-_w_i_n_d_o_w specifies a window in the form _s_e_s_s_i_o_n:_i_n_d_e_x, for example
! 218: mysession:1. The session is in the same form as for _t_a_r_g_e_t_-_s_e_s_s_i_o_n.
! 219: _s_e_s_s_i_o_n, _i_n_d_e_x or both may be omitted. If _s_e_s_s_i_o_n is omitted, the same
! 220: rules as for _t_a_r_g_e_t_-_s_e_s_s_i_o_n are followed; if _i_n_d_e_x is not present, the
! 221: current window for the given session is used. When the argument does not
! 222: contain a colon (:), ttmmuuxx first attempts to parse it as window index; if
! 223: that fails, an attempt is made to match a session or client name.
! 224:
! 225: Multiple commands may be specified together as part of a _c_o_m_m_a_n_d
! 226: _s_e_q_u_e_n_c_e. Each command should be separated by spaces and a semicolon (`
! 227: ; '); commands are executed sequentially from left to right. A literal
! 228: semicolon may be included by escaping it with a backslash (for example,
! 229: when specifying a command sequence to bbiinndd--kkeeyy).
! 230:
! 231: Examples include:
! 232:
! 233: refresh-client -t/dev/ttyp2
! 234:
! 235: rename-session -tfirst newname
! 236:
! 237: set-window-option -t:0 monitor-activity on
! 238:
! 239: new-window ; split-window -d
! 240:
! 241: bind-key D detach-client \; lock-server
! 242:
! 243: The following commands are available:
! 244:
! 245: aattttaacchh--sseessssiioonn [--dd] [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n]
! 246: (alias: aattttaacchh)
! 247: Create a new client in the current terminal and attach it to a
! 248: session. If --dd is specified, any other clients attached to the
! 249: session are detached.
! 250:
! 251: If no server is started, aattttaacchh--sseessssiioonn will attempt to start it;
! 252: this will fail unless sessions are created in the configuration
! 253: file.
! 254:
! 255: bbiinndd--kkeeyy [--rr] _k_e_y _c_o_m_m_a_n_d [_a_r_g_u_m_e_n_t_s]
! 256: (alias: bbiinndd)
! 257: Bind key _k_e_y to _c_o_m_m_a_n_d. Keys may be specified prefixed with
! 258: `C-' or `^' for ctrl keys, or `M-' for alt (meta) keys. The --rr
! 259: flag indicates this key may repeat, see the rreeppeeaatt--ttiimmee option.
! 260:
! 261: bbrreeaakk--ppaannee [--dd] [--pp _p_a_n_e_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 262: (alias: bbrreeaakkpp))
! 263: Break the current pane off from its containing window to make it
! 264: the only pane in a new window. If --dd is given, the new window
! 265: does not become the current window.
! 266:
! 267: cchhoooossee--sseessssiioonn [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 268: Put a window into session choice mode, where the session for the
! 269: current client may be selected interactively from a list. This
! 270: command works only from inside ttmmuuxx.
! 271:
! 272: cchhoooossee--wwiinnddooww [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 273: Put a window into window choice mode, where the window for the
! 274: session attached to the current client may be selected interac-
! 275: tively from a list. This command works only from inside ttmmuuxx.
! 276:
! 277: cclloocckk--mmooddee [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 278: Display a large clock.
! 279:
! 280: ccoommmmaanndd--pprroommpptt [--tt _t_a_r_g_e_t_-_c_l_i_e_n_t] [_t_e_m_p_l_a_t_e]
! 281: Open the command prompt in a client. This may be used from in-
! 282: side ttmmuuxx to execute commands interactively. If _t_e_m_p_l_a_t_e is
! 283: specified, it is used as the command; any %% in the template will
! 284: be replaced by what is entered at the prompt.
! 285:
! 286: ccoonnffiirrmm--bbeeffoorree [--tt _t_a_r_g_e_t_-_c_l_i_e_n_t] _c_o_m_m_a_n_d
! 287: (alias: ccoonnffiirrmm))
! 288: Ask for confirmation before executing _c_o_m_m_a_n_d. This command
! 289: works only from inside ttmmuuxx.
! 290:
! 291: ccooppyy--bbuuffffeerr [--aa _s_r_c_-_i_n_d_e_x] [--bb _d_s_t_-_i_n_d_e_x] [--ss _s_r_c_-_s_e_s_s_i_o_n] [--tt
! 292: _d_s_t_-_s_e_s_s_i_o_n]
! 293: (alias: ccooppyybb))
! 294: Copy a session paste buffer to another session. If no sessions
! 295: are specified, the current one is used instead.
! 296:
! 297: ccooppyy--mmooddee [--uu] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 298: Enter copy mode. The --uu option scrolls one page up.
! 299:
! 300: ddeelleettee--bbuuffffeerr [--bb _b_u_f_f_e_r_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n]
! 301: (alias: ddeelleetteebb)
! 302: Delete the buffer at _b_u_f_f_e_r_-_i_n_d_e_x, or the top buffer if not spec-
! 303: ified.
! 304:
! 305: ddeettaacchh--cclliieenntt [--tt _t_a_r_g_e_t_-_c_l_i_e_n_t]
! 306: (alias: ddeettaacchh)
! 307: Detach the current client if bound to a key, or the specified
! 308: client with --tt.
! 309:
! 310: ddoowwnn--ppaannee [--pp _p_a_n_e_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 311: (alias: ddoowwnnpp)
! 312: Move down a pane.
! 313:
! 314: ffiinndd--wwiinnddooww [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w] _m_a_t_c_h_-_s_t_r_i_n_g
! 315: (alias: ffiinnddww)
! 316: Search for _m_a_t_c_h_-_s_t_r_i_n_g in window names, titles, and visible con-
! 317: tent (but not history). If only one window is matched, it'll be
! 318: automatically selected, otherwise a choice list is shown. This
! 319: command only works from inside ttmmuuxx.
! 320:
! 321: hhaass--sseessssiioonn [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n]
! 322: (alias: hhaass)
! 323: Report an error and exit with 1 if the specified session does not
! 324: exist. If it does exist, exit with 0.
! 325:
! 326: kkiillll--ppaannee [--pp _p_a_n_e_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 327: (alias: kkiillllpp)
! 328: Destroy the given pane.
! 329:
! 330: kkiillll--sseerrvveerr
! 331: Kill the ttmmuuxx server and clients and destroy all sessions.
! 332:
! 333: kkiillll--sseessssiioonn [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n]
! 334: Destroy the given session, closing any windows linked to it and
! 335: no other sessions, and detaching all clients attached to it.
! 336:
! 337: kkiillll--wwiinnddooww [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 338: (alias: kkiillllww)
! 339: Kill the current window or the window at _t_a_r_g_e_t_-_w_i_n_d_o_w, removing
! 340: it from any sessions to which it is linked.
! 341:
! 342: llaasstt--wwiinnddooww [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n]
! 343: (alias: llaasstt)
! 344: Select the last (previously selected) window. If no _t_a_r_g_e_t_-
! 345: _s_e_s_s_i_o_n is specified, select the last window of the current ses-
! 346: sion.
! 347:
! 348: lliinnkk--wwiinnddooww [--ddkk] [--ss _s_r_c_-_w_i_n_d_o_w] [--tt _d_s_t_-_w_i_n_d_o_w]
! 349: (alias: lliinnkkww)
! 350: Link the window at _s_r_c_-_w_i_n_d_o_w to the specified _d_s_t_-_w_i_n_d_o_w. If
! 351: _d_s_t_-_w_i_n_d_o_w is specified and no such window exists, the _s_r_c_-_w_i_n_d_o_w
! 352: is linked there. If --kk is given and _d_s_t_-_w_i_n_d_o_w exists, it is
! 353: killed, otherwise an error is generated. If --dd is given, the
! 354: newly linked window is not selected.
! 355:
! 356: lliisstt--bbuuffffeerrss [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n]
! 357: (alias: llssbb)
! 358: List the buffers in the given session.
! 359:
! 360: lliisstt--cclliieennttss
! 361: (alias: llsscc)
! 362: List all clients attached to the server.
! 363:
! 364: lliisstt--ccoommmmaannddss
! 365: (alias: llssccmm)
! 366: List the syntax of all commands supported by ttmmuuxx.
! 367:
! 368: lliisstt--kkeeyyss
! 369: (alias: llsskk)
! 370: List all key bindings.
! 371:
! 372: lliisstt--sseessssiioonnss
! 373: (alias: llss)
! 374: List all sessions managed by the server.
! 375:
! 376: lliisstt--wwiinnddoowwss [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n]
! 377: (alias: llssww)
! 378: List windows in the current session or in _t_a_r_g_e_t_-_s_e_s_s_i_o_n.
! 379:
! 380: llooaadd--bbuuffffeerr [--bb _b_u_f_f_e_r_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n] _p_a_t_h
! 381: (alias: llooaaddbb)
! 382: Load the contents of the specified paste buffer from _p_a_t_h.
! 383:
! 384: lloocckk--sseerrvveerr
! 385: (alias: lloocckk)
! 386: Lock the server until a password is entered.
! 387:
! 388: mmoovvee--wwiinnddooww [--dd] [--ss _s_r_c_-_w_i_n_d_o_w] [--tt _d_s_t_-_w_i_n_d_o_w]
! 389: (alias: mmoovveeww)
! 390: This is similar to lliinnkk--wwiinnddooww, except the window at _s_r_c_-_w_i_n_d_o_w
! 391: is moved to _d_s_t_-_w_i_n_d_o_w.
! 392:
! 393: nneeww--sseessssiioonn [--dd] [--nn _w_i_n_d_o_w_-_n_a_m_e] [--ss _s_e_s_s_i_o_n_-_n_a_m_e] [_c_o_m_m_a_n_d]
! 394: (alias: nneeww)
! 395: Create a new session with name _s_e_s_s_i_o_n_-_n_a_m_e. The new session is
! 396: attached to the current terminal unless --dd is given. _w_i_n_d_o_w_-_n_a_m_e
! 397: and _c_o_m_m_a_n_d are the name of and command to execute in the initial
! 398: window.
! 399:
! 400: nneeww--wwiinnddooww [--dd] [--nn _w_i_n_d_o_w_-_n_a_m_e] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w] [_c_o_m_m_a_n_d]
! 401: (alias: nneewwww)
! 402: Create a new window. If --dd is given, the session does not make
! 403: the new window the current window. _t_a_r_g_e_t_-_w_i_n_d_o_w represents the
! 404: window to be created. _c_o_m_m_a_n_d is the command to execute. If
! 405: _c_o_m_m_a_n_d is not specified, the default command is used.
! 406:
! 407: The TERM environment variable must be set to ``screen'' for all
! 408: programs running _i_n_s_i_d_e ttmmuuxx. New windows will automatically
! 409: have ``TERM=screen'' added to their environment, but care must be
! 410: taken not to reset this in shell start-up files.
! 411:
! 412: nneexxtt--llaayyoouutt [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 413: (alias: nneexxttll)
! 414: Move a window to the next layout and rearrange the panes to fit.
! 415:
! 416: nneexxtt--wwiinnddooww [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n]
! 417: (alias: nneexxtt)
! 418: Move to the next window in the session.
! 419:
! 420: ppaassttee--bbuuffffeerr [--dd] [--bb _b_u_f_f_e_r_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 421: (alias: ppaasstteebb)
! 422: Insert the contents of a paste buffer into the current window.
! 423:
! 424: pprreevviioouuss--wwiinnddooww [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n]
! 425: (alias: pprreevv)
! 426: Move to the previous window in the session.
! 427:
! 428: rreeffrreesshh--cclliieenntt [--tt _t_a_r_g_e_t_-_c_l_i_e_n_t]
! 429: (alias: rreeffrreesshh)
! 430: Refresh the current client if bound to a key, or a single client
! 431: if one is given with --tt.
! 432:
! 433: rreennaammee--sseessssiioonn [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n] _n_e_w_-_n_a_m_e
! 434: (alias: rreennaammee)
! 435: Rename the session to _n_e_w_-_n_a_m_e.
! 436:
! 437: rreennaammee--wwiinnddooww [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w] _n_e_w_-_n_a_m_e
! 438: (alias: rreennaammeeww)
! 439: Rename the current window, or the window at _t_a_r_g_e_t_-_w_i_n_d_o_w if
! 440: specified, to _n_e_w_-_n_a_m_e.
! 441:
! 442: rreessiizzee--ppaannee [--DDUU] [--pp _p_a_n_e_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w] [_a_d_j_u_s_t_m_e_n_t]
! 443: (alias: rreessiizzeepp)
! 444: Resize a pane, upward with --UU (the default) or downward with --DD.
! 445: The _a_d_j_u_s_t_m_e_n_t is given in lines (the default is 1).
! 446:
! 447: rreessppaawwnn--wwiinnddooww [--kk] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w] [_c_o_m_m_a_n_d]
! 448: (alias: rreessppaawwnnww)
! 449: Reactive a window in which the command has exited (see the
! 450: rreemmaaiinn--oonn--eexxiitt window option). If _c_o_m_m_a_n_d is not given, the com-
! 451: mand used when the window was created is executed. The window
! 452: must be already inactive, unless --kk is given, in which case any
! 453: existing command is killed.
! 454:
! 455: rroottaattee--wwiinnddooww [--DDUU] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 456: (alias: rroottaatteeww)
! 457: Rotate the positions of the panes within a window, either upward
! 458: (numerically lower) with --UU or downward (numerically higher).
! 459:
! 460: ssaavvee--bbuuffffeerr [--aa] [--bb _b_u_f_f_e_r_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n] _p_a_t_h
! 461: (alias: ssaavveebb)
! 462: Save the contents of the specified paste buffer to _p_a_t_h. The --aa
! 463: option appends to rather than overwriting the file.
! 464:
! 465: ssccrroollll--mmooddee [--uu] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 466: Enter scroll mode. The --uu has the same meaning as in the ccooppyy--
! 467: mmooddee command.
! 468:
! 469: sseelleecctt--ppaannee [--pp _p_a_n_e_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 470: (alias: sseelleeccttpp)
! 471: Make pane _p_a_n_e_-_i_n_d_e_x the active pane in window _t_a_r_g_e_t_-_w_i_n_d_o_w.
! 472:
! 473: sseelleecctt--pprroommpptt [--tt _t_a_r_g_e_t_-_c_l_i_e_n_t]
! 474: Open a prompt inside _t_a_r_g_e_t_-_c_l_i_e_n_t allowing a window index to be
! 475: entered interactively.
! 476:
! 477: sseelleecctt--wwiinnddooww [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 478: (alias: sseelleeccttww)
! 479: Select the window at _t_a_r_g_e_t_-_w_i_n_d_o_w.
! 480:
! 481: sseenndd--kkeeyyss [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w] _k_e_y _._._.
! 482: (alias: sseenndd)
! 483: Send a key or keys to a window. Each argument _k_e_y is the name of
! 484: the key (such as `C-a' or `npage' ) to send; if the string is not
! 485: recognised as a key, it is sent as a series of characters. All
! 486: arguments are sent sequentially from first to last.
! 487:
! 488: sseenndd--pprreeffiixx [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 489: Send the prefix key to a window as if it was pressed.
! 490:
! 491: sseerrvveerr--iinnffoo
! 492: (alias: iinnffoo)
! 493: Show server information and terminal details.
! 494:
! 495: sseett--bbuuffffeerr [--bb _b_u_f_f_e_r_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n] _d_a_t_a
! 496: (alias: sseettbb)
! 497: Set the contents of the specified buffer to _d_a_t_a.
! 498:
! 499: sseett--ooppttiioonn [--gguu] [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n] _o_p_t_i_o_n _v_a_l_u_e
! 500: (alias: sseett)
! 501: Set an option. If --gg is specified, the option is set as a global
! 502: option. Global options apply to all sessions which don't have
! 503: the option explicitly set. If --gg is not used, the option applies
! 504: only to _t_a_r_g_e_t_-_s_e_s_s_i_o_n. The --uu flag unsets an option, so a ses-
! 505: sion inherits the option from the global options - it is not pos-
! 506: sible to unset a global option.
! 507:
! 508: Possible options are:
! 509:
! 510: bbeellll--aaccttiioonn [aannyy | nnoonnee | ccuurrrreenntt]
! 511: Set action on window bell. aannyy means a bell in any win-
! 512: dow linked to a session causes a bell in the current win-
! 513: dow of that session, nnoonnee means all bells are ignored and
! 514: ccuurrrreenntt means only bell in windows other than the current
! 515: window are ignored.
! 516:
! 517: bbuuffffeerr--lliimmiitt _n_u_m_b_e_r
! 518: Set the number of buffers kept for each session; as new
! 519: buffers are added to the top of the stack, old ones are
! 520: removed from the bottom if necessary to maintain this
! 521: maximum length.
! 522:
! 523: ddeeffaauulltt--ccoommmmaanndd _c_o_m_m_a_n_d
! 524: Set the command used for new windows (if not specified
! 525: when the window is created) to _c_o_m_m_a_n_d. The default is
! 526: ``exec $SHELL''.
! 527:
! 528: ddeeffaauulltt--ppaatthh _p_a_t_h
! 529: Set the default working directory for processes created
! 530: from keys, or interactively from the prompt. The default
! 531: is the current working directory when the server is
! 532: started.
! 533:
! 534: hhiissttoorryy--lliimmiitt _l_i_n_e_s
! 535: Set the maximum number of lines held in window history.
! 536: This setting applies only to new windows - existing win-
! 537: dow histories are not resized and retain the limit at the
! 538: point they were created.
! 539:
! 540: lloocckk--aafftteerr--ttiimmee _n_u_m_b_e_r
! 541: Lock the server after _n_u_m_b_e_r seconds of inactivity. The
! 542: default is off (set to 0). This has no effect as a ses-
! 543: sion option; it must be set as a global option using --gg.
! 544:
! 545: mmeessssaaggee--aattttrr _a_t_t_r_i_b_u_t_e_s
! 546: Set status line message attributes, where _a_t_t_r_i_b_u_t_e_s is
! 547: either ddeeffaauulltt or a comma-delimited list of one or more
! 548: of: bbrriigghhtt (or bboolldd), ddiimm, uunnddeerrssccoorree, bblliinnkk, rreevveerrssee,
! 549: hhiiddddeenn, or iittaalliiccss.
! 550:
! 551: mmeessssaaggee--bbgg _c_o_l_o_u_r
! 552: Set status line message background colour, where _c_o_l_o_u_r
! 553: is one of: bbllaacckk, rreedd, ggrreeeenn, yyeellllooww, bblluuee, mmaaggeennttaa,
! 554: ccyyaann, wwhhiittee or ddeeffaauulltt.
! 555:
! 556: mmeessssaaggee--ffgg _c_o_l_o_u_r
! 557: Set status line message foreground colour.
! 558:
! 559: pprreeffiixx _k_e_y
! 560: Set the current prefix key.
! 561:
! 562: rreeppeeaatt--ttiimmee _n_u_m_b_e_r
! 563: Allow multiple commands to be entered without pressing
! 564: the prefix-key again in the specified _n_u_m_b_e_r milliseconds
! 565: (the default is 500). Whether a key repeats may be set
! 566: when it is bound using the --rr flag to bbiinndd--kkeeyy. Repeat
! 567: is enabled for the default keys of the uupp--ppaannee, ddoowwnn--
! 568: ppaannee, rreessiizzee--ppaannee--uupp, and rreessiizzee--ppaannee--ddoowwnn commands.
! 569:
! 570: sseett--rreemmaaiinn--oonn--eexxiitt [oonn | ooffff]
! 571: Set the rreemmaaiinn--oonn--eexxiitt window option for any windows
! 572: first created in this session.
! 573:
! 574: sseett--ttiittlleess [oonn | ooffff]
! 575: Attempt to set the window title using the \e]2;...\007
! 576: xterm code and the terminal appears to be an xterm. This
! 577: option is enabled by default. Note that elinks(1) will
! 578: only attempt to set the window title if the STY environ-
! 579: ment variable is set.
! 580:
! 581: ssttaattuuss [oonn | ooffff]
! 582: Show or hide the status line.
! 583:
! 584: ssttaattuuss--aattttrr _a_t_t_r_i_b_u_t_e_s
! 585: Set status line attributes.
! 586:
! 587: ssttaattuuss--bbgg _c_o_l_o_u_r
! 588: Set status line background colour.
! 589:
! 590: ssttaattuuss--ffgg _c_o_l_o_u_r
! 591: Set status line foreground colour.
! 592:
! 593: ssttaattuuss--iinntteerrvvaall _i_n_t_e_r_v_a_l
! 594: Update the status bar every _i_n_t_e_r_v_a_l seconds. By de-
! 595: fault, updates will occur every 15 seconds. A setting of
! 596: zero disables redrawing at interval.
! 597:
! 598: ssttaattuuss--kkeeyyss [vvii | eemmaaccss]
! 599: Use vi(1)- or emacs(1)-style key bindings in the status
! 600: line, for example at the command prompt. Defaults to
! 601: emacs.
! 602:
! 603: ssttaattuuss--lleefftt _s_t_r_i_n_g
! 604: Display _s_t_r_i_n_g to the left of the status bar. _s_t_r_i_n_g
! 605: will be passed through strftime(3) before being used. By
! 606: default, the session name is shown. _s_t_r_i_n_g may contain
! 607: any of the following special character pairs:
! 608:
! 609: CChhaarraacctteerr ppaaiirr RReeppllaacceedd wwiitthh
! 610: #(command) First line of command's output
! 611: #H Hostname of local host
! 612: #S Session name
! 613: #T Current window title
! 614: ## A literal `#'
! 615:
! 616: Where appropriate, these may be prefixed with a number to
! 617: specify the maximum length, for example `#24T'.
! 618:
! 619: ssttaattuuss--lleefftt--lleennggtthh _l_e_n_g_t_h
! 620: Set the maximum _l_e_n_g_t_h of the left component of the sta-
! 621: tus bar. The default is 10.
! 622:
! 623: ssttaattuuss--rriigghhtt _s_t_r_i_n_g
! 624: Display _s_t_r_i_n_g to the right of the status bar. By de-
! 625: fault, the date and time will be shown. As with ssttaattuuss--
! 626: lleefftt, _s_t_r_i_n_g will be passed to strftime(3) and character
! 627: pairs are replaced.
! 628:
! 629: ssttaattuuss--rriigghhtt--lleennggtthh _l_e_n_g_t_h
! 630: Set the maximum _l_e_n_g_t_h of the right component of the sta-
! 631: tus bar. The default is 40.
! 632:
! 633: sseett--ppaasssswwoorrdd [--cc] _p_a_s_s_w_o_r_d
! 634: (alias: ppaassss)
! 635: Set the server password. If the --cc option is given, a pre-en-
! 636: crypted password may be specified. By default, the password is
! 637: blank, thus any entered password will be accepted when unlocking
! 638: the server (see the lloocckk--sseerrvveerr command). To prevent variable
! 639: expansion when an encrypted password is read from a configuration
! 640: file, enclose it in single quotes (').
! 641:
! 642: sseett--wwiinnddooww--ooppttiioonn [--gguu] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w] _o_p_t_i_o_n _v_a_l_u_e
! 643: (alias: sseettww)
! 644: Set a window-specific option. The --gg and --uu flags work similarly
! 645: to the sseett--ooppttiioonn command.
! 646:
! 647: Supported options are:
! 648:
! 649: aaggggrreessssiivvee--rreessiizzee [oonn | ooffff]
! 650: Aggressively resize the chosen window. This means that
! 651: ttmmuuxx will resize the window to the size of the smallest
! 652: session for which it is the current window, rather than
! 653: the smallest session to which it is attached. The window
! 654: may resize when the current window is changed on another
! 655: sessions; this option is good for full-screen programs
! 656: which support SIGWINCH and poor for interactive programs
! 657: such as shells.
! 658:
! 659: aauuttoommaattiicc--rreennaammee [oonn | ooffff]
! 660: Control automatic window renaming. When this setting is
! 661: enabled, ttmmuuxx will attempt - on supported platforms - to
! 662: rename the window to reflect the command currently run-
! 663: ning in it. This flag is automatically disabled for an
! 664: individual window when a name is specified at creation
! 665: with nneeww--wwiinnddooww oorr nneeww--sseessssiioonn, or later with rreennaammee--
! 666: wwiinnddooww. It may be switched off globally with:
! 667:
! 668: set-window-option -g automatic-rename off
! 669:
! 670: cclloocckk--mmooddee--ccoolloouurr _c_o_l_o_u_r
! 671: Set clock colour.
! 672:
! 673: cclloocckk--mmooddee--ssttyyllee [1122 | 2244]
! 674: Set clock hour format.
! 675:
! 676: ffoorrccee--hheeiigghhtt _h_e_i_g_h_t
! 677:
! 678: ffoorrccee--wwiiddtthh _w_i_d_t_h
! 679: Prevent ttmmuuxx from resizing a window to greater than _w_i_d_t_h
! 680: or _h_e_i_g_h_t. A value of zero restores the default unlimit-
! 681: ed setting.
! 682:
! 683: mmooddee--aattttrr _a_t_t_r_i_b_u_t_e_s
! 684: Set window modes attributes.
! 685:
! 686: mmooddee--bbgg _c_o_l_o_u_r
! 687: Set window modes background colour.
! 688:
! 689: mmooddee--ffgg _c_o_l_o_u_r
! 690: Set window modes foreground colour.
! 691:
! 692: mmooddee--kkeeyyss [vvii | eemmaaccss]
! 693: Use vi(1)- or emacs(1)-style key bindings in scroll and
! 694: copy modes. Key bindings default to emacs.
! 695:
! 696: mmoonniittoorr--aaccttiivviittyy [oonn | ooffff]
! 697: Monitor for activity in the window. Windows with activi-
! 698: ty are highlighted in the status line.
! 699:
! 700: mmoonniittoorr--ccoonntteenntt _m_a_t_c_h_-_s_t_r_i_n_g
! 701: Monitor content in the window. When _m_a_t_c_h_-_s_t_r_i_n_g appears
! 702: in the window, it is highlighted in the status line.
! 703:
! 704: rreemmaaiinn--oonn--eexxiitt [oonn | ooffff]
! 705: A window with this flag set is not destroyed when the
! 706: program running in it exits. The window may be reacti-
! 707: vated with the rreessppaawwnn--wwiinnddooww command.
! 708:
! 709: uuttff88 [oonn | ooffff]
! 710: Instructs ttmmuuxx to expect UTF-8 sequences to appear in
! 711: this window.
! 712:
! 713: wwiinnddooww--ssttaattuuss--aattttrr _a_t_t_r_i_b_u_t_e_s
! 714: Set status line attributes for a single window.
! 715:
! 716: wwiinnddooww--ssttaattuuss--bbgg _c_o_l_o_u_r
! 717: Set status line background colour for a single window.
! 718:
! 719: wwiinnddooww--ssttaattuuss--ffgg _c_o_l_o_u_r
! 720: Set status line foreground colour for a single window.
! 721:
! 722: xxtteerrmm--kkeeyyss [oonn | ooffff]
! 723: If this option is set, ttmmuuxx will generate xterm(1)-style
! 724: function key sequences; these have a number included to
! 725: indicate modifiers such as shift, meta or ctrl.
! 726:
! 727: sshhooww--bbuuffffeerr [--bb _b_u_f_f_e_r_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n]
! 728: (alias: sshhoowwbb)
! 729: Display the contents of the specified buffer.
! 730:
! 731: sshhooww--ooppttiioonnss [--tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n] _o_p_t_i_o_n _v_a_l_u_e
! 732: (alias: sshhooww)
! 733: Show the currently set options. If a _t_a_r_g_e_t_-_s_e_s_s_i_o_n is speci-
! 734: fied, the options for that session are shown; otherwise, the
! 735: global options are listed.
! 736:
! 737: sshhooww--wwiinnddooww--ooppttiioonnss [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w] _o_p_t_i_o_n _v_a_l_u_e
! 738: (alias: sshhoowwww)
! 739: List the current options for the given window.
! 740:
! 741: ssoouurrccee--ffiillee _p_a_t_h
! 742: (alias: ssoouurrccee)
! 743: Execute commands from _p_a_t_h.
! 744:
! 745: sspplliitt--wwiinnddooww [--dd] [--ll _l_i_n_e_s | --pp _p_e_r_c_e_n_t_a_g_e] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w] [_c_o_m_m_a_n_d]
! 746: (alias: splitw)
! 747: Creates a new window by splitting it vertically. The --ll and --pp
! 748: options specify the size of the new window in lines, or as a per-
! 749: centage, respectively. All other options have the same meaning
! 750: as in the nneeww--wwiinnddooww command.
! 751:
! 752: A few notes with regard to panes:
! 753: 1. If attempting to split a window with less than eight lines,
! 754: an error will be shown.
! 755: 2. If the window is resized, as many panes are shown as can fit
! 756: without reducing them below four lines.
! 757: 3. The minimum pane size is four lines (including the separator
! 758: line).
! 759: 4. The panes are indexed from top (0) to bottom, with no num-
! 760: bers skipped.
! 761:
! 762: ssttaarrtt--sseerrvveerr
! 763: (alias: ssttaarrtt)
! 764: Start the ttmmuuxx server, if not already running, without creating
! 765: any sessions.
! 766:
! 767: ssuussppeenndd--cclliieenntt [--cc --ttaarrggeett--cclliieenntt]
! 768: (alias: ssuussppeennddcc)
! 769: Suspend a client by sending SIGTSTP (tty stop).
! 770:
! 771: sswwaapp--ppaannee [--ddDDUU] [--pp _s_r_c_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w] [--qq _d_s_t_-_i_n_d_e_x]
! 772: (alias: sswwaapppp)
! 773: Swap two panes within a window. If --UU is used, the pane is
! 774: swapped with the pane above (before it numerically); --DD swaps
! 775: with the pane below (the next numerically); or _d_s_t_-_i_n_d_e_x may be
! 776: give to swap with a specific pane.
! 777:
! 778: sswwaapp--wwiinnddooww [--dd] [--ss _s_r_c_-_w_i_n_d_o_w] [--tt _d_s_t_-_w_i_n_d_o_w]
! 779: (alias: sswwaappww)
! 780: This is similar to lliinnkk--wwiinnddooww, except the source and destination
! 781: windows are swapped. It is an error if no window exists at _s_r_c_-
! 782: _w_i_n_d_o_w.
! 783:
! 784: sswwiittcchh--cclliieenntt [--cc _t_a_r_g_e_t_-_c_l_i_e_n_t --tt _t_a_r_g_e_t_-_s_e_s_s_i_o_n]
! 785: (alias: sswwiittcchhcc)
! 786: Switch the current session for client _t_a_r_g_e_t_-_c_l_i_e_n_t to _t_a_r_g_e_t_-
! 787: _s_e_s_s_i_o_n.
! 788:
! 789: uunnbbiinndd--kkeeyy _k_e_y
! 790: (alias: uunnbbiinndd)
! 791: Unbind the key bound to _k_e_y.
! 792:
! 793: uunnlliinnkk--wwiinnddooww [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 794: (alias: uunnlliinnkkww)
! 795: Unlink _t_a_r_g_e_t_-_w_i_n_d_o_w. A window may be unlinked only if it is
! 796: linked to multiple sessions - windows may not be linked to no
! 797: sessions.
! 798:
! 799: uupp--ppaannee [--pp _p_a_n_e_-_i_n_d_e_x] [--tt _t_a_r_g_e_t_-_w_i_n_d_o_w]
! 800: (alias: uupppp)
! 801: Move up a pane.
! 802:
! 803: FFIILLEESS
! 804: ~/.tmux.conf
! 805: default ttmmuuxx configuration file
! 806:
! 807: SSEEEE AALLSSOO
! 808: pty(4)
! 809:
! 810: AAUUTTHHOORRSS
! 811: Nicholas Marriott <nicm@users.sourceforge.net>
! 812:
! 813: OpenBSD 4.5 April 20, 2009 13