Annotation of src/usr.bin/tmux/tmux.1, Revision 1.569
1.569 ! nicm 1: .\" $OpenBSD: tmux.1,v 1.568 2017/07/21 09:17:19 nicm Exp $
1.1 nicm 2: .\"
1.477 nicm 3: .\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
1.1 nicm 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.569 ! nicm 17: .Dd $Mdocdate: July 21 2017 $
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
1.434 jmc 26: .Op Fl 2Cluv
1.91 nicm 27: .Op Fl c Ar shell-command
1.1 nicm 28: .Op Fl f Ar file
29: .Op Fl L Ar socket-name
30: .Op Fl S Ar socket-path
31: .Op Ar command Op Ar flags
32: .Ek
33: .Sh DESCRIPTION
34: .Nm
1.59 jmc 35: is a terminal multiplexer:
36: it enables a number of terminals to be created, accessed, and
37: controlled from a single screen.
1.67 jmc 38: .Nm
39: may be detached from a screen
40: and continue running in the background,
41: then later reattached.
1.1 nicm 42: .Pp
1.60 nicm 43: When
44: .Nm
45: is started it creates a new
46: .Em session
47: with a single
48: .Em window
49: and displays it on screen.
50: A status line at the bottom of the screen
51: shows information on the current session
52: and is used to enter interactive commands.
53: .Pp
54: A session is a single collection of
55: .Em pseudo terminals
56: under the management of
57: .Nm .
58: Each session has one or more
59: windows linked to it.
60: A window occupies the entire screen
61: and may be split into rectangular panes,
62: each of which is a separate pseudo terminal
63: (the
64: .Xr pty 4
65: manual page documents the technical details of pseudo terminals).
66: Any number of
67: .Nm
68: instances may connect to the same session,
69: and any number of windows may be present in the same session.
70: Once all sessions are killed,
71: .Nm
72: exits.
73: .Pp
1.64 nicm 74: Each session is persistent and will survive accidental disconnection
1.66 jmc 75: (such as
1.64 nicm 76: .Xr ssh 1
1.67 jmc 77: connection timeout) or intentional detaching (with the
1.64 nicm 78: .Ql C-b d
79: key strokes).
80: .Nm
81: may be reattached using:
82: .Pp
83: .Dl $ tmux attach
1.60 nicm 84: .Pp
1.64 nicm 85: In
86: .Nm ,
87: a session is displayed on screen by a
88: .Em client
89: and all sessions are managed by a single
90: .Em server .
91: The server and each client are separate processes which communicate through a
92: socket in
93: .Pa /tmp .
1.65 nicm 94: .Pp
1.1 nicm 95: The options are as follows:
96: .Bl -tag -width "XXXXXXXXXXXX"
97: .It Fl 2
98: Force
99: .Nm
100: to assume the terminal supports 256 colours.
1.345 nicm 101: .It Fl C
1.369 nicm 102: Start in control mode (see the
103: .Sx CONTROL MODE
104: section).
1.345 nicm 105: Given twice
106: .Xo ( Fl CC ) Xc
107: disables echo.
1.91 nicm 108: .It Fl c Ar shell-command
109: Execute
110: .Ar shell-command
111: using the default shell.
112: If necessary, the
113: .Nm
114: server will be started to retrieve the
115: .Ic default-shell
116: option.
1.153 nicm 117: This option is for compatibility with
118: .Xr sh 1
119: when
120: .Nm
121: is used as a login shell.
1.1 nicm 122: .It Fl f Ar file
123: Specify an alternative configuration file.
124: By default,
125: .Nm
1.26 nicm 126: loads the system configuration file from
127: .Pa /etc/tmux.conf ,
128: if present, then looks for a user configuration file at
1.1 nicm 129: .Pa ~/.tmux.conf .
1.306 nicm 130: .Pp
1.1 nicm 131: The configuration file is a set of
132: .Nm
133: commands which are executed in sequence when the server is first started.
1.306 nicm 134: .Nm
135: loads configuration files once when the server process has started.
136: The
137: .Ic source-file
138: command may be used to load a file later.
1.61 nicm 139: .Pp
140: .Nm
1.306 nicm 141: shows any error messages from commands in configuration files in the first
142: session created, and continues to process the rest of the configuration file.
1.1 nicm 143: .It Fl L Ar socket-name
144: .Nm
145: stores the server socket in a directory under
1.455 nicm 146: .Ev TMUX_TMPDIR
147: or
1.208 nicm 148: .Pa /tmp
1.455 nicm 149: if it is unset.
1.355 nicm 150: The default socket is named
1.1 nicm 151: .Em default .
152: This option allows a different socket name to be specified, allowing several
153: independent
154: .Nm
155: servers to be run.
156: Unlike
157: .Fl S
158: a full path is not necessary: the sockets are all created in the same
159: directory.
1.2 nicm 160: .Pp
161: If the socket is accidentally removed, the
1.6 jmc 162: .Dv SIGUSR1
1.2 nicm 163: signal may be sent to the
164: .Nm
1.422 nicm 165: server process to recreate it (note that this will fail if any parent
166: directories are missing).
1.166 sobrado 167: .It Fl l
168: Behave as a login shell.
169: This flag currently has no effect and is for compatibility with other shells
170: when using tmux as a login shell.
1.1 nicm 171: .It Fl S Ar socket-path
172: Specify a full alternative path to the server socket.
173: If
174: .Fl S
175: is specified, the default socket directory is not used and any
176: .Fl L
177: flag is ignored.
178: .It Fl u
1.523 nicm 179: When starting,
1.1 nicm 180: .Nm
1.523 nicm 181: looks for the
1.14 nicm 182: .Ev LC_ALL ,
183: .Ev LC_CTYPE
184: and
1.2 nicm 185: .Ev LANG
1.523 nicm 186: environment variables: if the first found contains
187: .Ql UTF-8 ,
188: then the terminal is assumed to support UTF-8.
1.5 nicm 189: This is not always correct: the
1.2 nicm 190: .Fl u
191: flag explicitly informs
192: .Nm
1.6 jmc 193: that UTF-8 is supported.
1.33 nicm 194: .Pp
1.458 nicm 195: Note that
196: .Nm
1.459 jmc 197: itself always accepts UTF-8; this controls whether it will send UTF-8
198: characters to the terminal it is running (if not, they are replaced by
1.458 nicm 199: .Ql _ ) .
1.1 nicm 200: .It Fl v
201: Request verbose logging.
202: Log messages will be saved into
203: .Pa tmux-client-PID.log
204: and
205: .Pa tmux-server-PID.log
206: files in the current directory, where
207: .Em PID
1.6 jmc 208: is the PID of the server or client process.
1.558 nicm 209: .Pp
210: If
211: .Fl v
212: is specified twice, an additional
213: .Pa tmux-out-PID.log
214: file is generated with a copy of everything
215: .Nm
216: writes to the terminal.
217: .Pp
218: The
219: .Dv SIGUSR2
220: signal may be sent to the
221: .Nm
222: server process to toggle logging between on (as if
223: .Fl v
224: was given) and off.
1.1 nicm 225: .It Ar command Op Ar flags
226: This specifies one of a set of commands used to control
227: .Nm ,
1.6 jmc 228: as described in the following sections.
1.59 jmc 229: If no commands are specified, the
1.1 nicm 230: .Ic new-session
231: command is assumed.
1.57 jmc 232: .El
1.64 nicm 233: .Sh KEY BINDINGS
234: .Nm
235: may be controlled from an attached client by using a key combination of a
236: prefix key,
237: .Ql C-b
238: (Ctrl-b) by default, followed by a command key.
239: .Pp
1.172 nicm 240: The default command key bindings are:
1.64 nicm 241: .Pp
1.171 nicm 242: .Bl -tag -width "XXXXXXXXXX" -offset indent -compact
243: .It C-b
244: Send the prefix key (C-b) through to the application.
245: .It C-o
246: Rotate the panes in the current window forwards.
247: .It C-z
248: Suspend the
249: .Nm
250: client.
251: .It !
252: Break the current pane out of the window.
253: .It \&"
254: Split the current pane into two, top and bottom.
255: .It #
256: List all paste buffers.
1.236 nicm 257: .It $
258: Rename the current session.
1.171 nicm 259: .It %
260: Split the current pane into two, left and right.
261: .It &
262: Kill the current window.
263: .It '
264: Prompt for a window index to select.
1.412 nicm 265: .It \&(
266: Switch the attached client to the previous session.
267: .It \&)
268: Switch the attached client to the next session.
1.171 nicm 269: .It ,
270: Rename the current window.
271: .It -
272: Delete the most recently copied buffer of text.
273: .It .
274: Prompt for an index to move the current window.
275: .It 0 to 9
276: Select windows 0 to 9.
277: .It :
278: Enter the
279: .Nm
280: command prompt.
1.187 nicm 281: .It ;
282: Move to the previously active pane.
1.178 nicm 283: .It =
284: Choose which buffer to paste interactively from a list.
1.171 nicm 285: .It \&?
286: List all key bindings.
287: .It D
288: Choose a client to detach.
1.412 nicm 289: .It L
290: Switch the attached client back to the last session.
1.182 jmc 291: .It \&[
1.171 nicm 292: Enter copy mode to copy text or view the history.
1.182 jmc 293: .It \&]
1.171 nicm 294: Paste the most recently copied buffer of text.
1.64 nicm 295: .It c
1.65 nicm 296: Create a new window.
1.64 nicm 297: .It d
1.65 nicm 298: Detach the current client.
1.171 nicm 299: .It f
300: Prompt to search for text in open windows.
301: .It i
302: Display some information about the current window.
1.64 nicm 303: .It l
1.65 nicm 304: Move to the previously selected window.
1.64 nicm 305: .It n
1.65 nicm 306: Change to the next window.
1.171 nicm 307: .It o
308: Select the next pane in the current window.
1.64 nicm 309: .It p
1.65 nicm 310: Change to the previous window.
1.171 nicm 311: .It q
312: Briefly display pane indexes.
313: .It r
314: Force redraw of the attached client.
1.432 nicm 315: .It m
316: Mark the current pane (see
317: .Ic select-pane
318: .Fl m ) .
319: .It M
320: Clear the marked pane.
1.171 nicm 321: .It s
322: Select a new session for the attached client interactively.
323: .It t
324: Show the time.
325: .It w
326: Choose the current window interactively.
327: .It x
328: Kill the current pane.
1.412 nicm 329: .It z
330: Toggle zoom state of the current pane.
1.171 nicm 331: .It {
332: Swap the current pane with the previous pane.
333: .It }
334: Swap the current pane with the next pane.
335: .It ~
336: Show previous messages from
337: .Nm ,
338: if any.
339: .It Page Up
340: Enter copy mode and scroll one page up.
341: .It Up, Down
342: .It Left, Right
343: Change to the pane above, below, to the left, or to the right of the current
344: pane.
345: .It M-1 to M-5
346: Arrange panes in one of the five preset layouts: even-horizontal,
347: even-vertical, main-horizontal, main-vertical, or tiled.
1.412 nicm 348: .It Space
349: Arrange the current window in the next preset layout.
1.171 nicm 350: .It M-n
351: Move to the next window with a bell or activity marker.
352: .It M-o
353: Rotate the panes in the current window backwards.
354: .It M-p
355: Move to the previous window with a bell or activity marker.
356: .It C-Up, C-Down
357: .It C-Left, C-Right
358: Resize the current pane in steps of one cell.
359: .It M-Up, M-Down
360: .It M-Left, M-Right
361: Resize the current pane in steps of five cells.
1.64 nicm 362: .El
363: .Pp
364: Key bindings may be changed with the
365: .Ic bind-key
366: and
367: .Ic unbind-key
368: commands.
1.57 jmc 369: .Sh COMMANDS
370: This section contains a list of the commands supported by
371: .Nm .
372: Most commands accept the optional
373: .Fl t
1.432 nicm 374: (and sometimes
375: .Fl s )
1.57 jmc 376: argument with one of
377: .Ar target-client ,
378: .Ar target-session
379: .Ar target-window ,
380: or
381: .Ar target-pane .
382: These specify the client, session, window or pane which a command should affect.
1.423 nicm 383: .Pp
1.57 jmc 384: .Ar target-client
1.540 nicm 385: should be the name of the client,
386: typically the
1.57 jmc 387: .Xr pty 4
388: file to which the client is connected, for example either of
389: .Pa /dev/ttyp1
390: or
391: .Pa ttyp1
392: for the client attached to
393: .Pa /dev/ttyp1 .
1.423 nicm 394: If no client is specified,
395: .Nm
396: attempts to work out the client currently in use; if that fails, an error is
397: reported.
1.57 jmc 398: Clients may be listed with the
399: .Ic list-clients
400: command.
1.1 nicm 401: .Pp
1.57 jmc 402: .Ar target-session
1.423 nicm 403: is tried as, in order:
404: .Bl -enum -offset Ds
405: .It
406: A session ID prefixed with a $.
407: .It
408: An exact name of a session (as listed by the
1.57 jmc 409: .Ic list-sessions
1.423 nicm 410: command).
411: .It
412: The start of a session name, for example
413: .Ql mysess
414: would match a session named
415: .Ql mysession .
416: .It
417: An
1.57 jmc 418: .Xr fnmatch 3
1.423 nicm 419: pattern which is matched against the session name.
420: .El
421: .Pp
1.441 nicm 422: If the session name is prefixed with an
423: .Ql = ,
1.435 nicm 424: only an exact match is accepted (so
425: .Ql =mysess
426: will only match exactly
427: .Ql mysess ,
428: not
429: .Ql mysession ) .
1.441 nicm 430: .Pp
1.423 nicm 431: If a single session is found, it is used as the target session; multiple matches
1.57 jmc 432: produce an error.
433: If a session is omitted, the current session is used if available; if no
1.117 nicm 434: current session is available, the most recently used is chosen.
1.1 nicm 435: .Pp
1.57 jmc 436: .Ar target-window
1.472 nicm 437: (or
438: .Ar src-window
439: or
440: .Ar dst-window )
1.57 jmc 441: specifies a window in the form
442: .Em session Ns \&: Ns Em window .
443: .Em session
444: follows the same rules as for
445: .Ar target-session ,
446: and
447: .Em window
1.423 nicm 448: is looked for in order as:
449: .Bl -enum -offset Ds
450: .It
451: A special token, listed below.
452: .It
453: A window index, for example
454: .Ql mysession:1
455: is window 1 in session
456: .Ql mysession .
457: .It
458: A window ID, such as @1.
459: .It
460: An exact window name, such as
461: .Ql mysession:mywindow .
462: .It
463: The start of a window name, such as
464: .Ql mysession:mywin .
465: .It
466: As an
1.57 jmc 467: .Xr fnmatch 3
1.423 nicm 468: pattern matched against the window name.
469: .El
470: .Pp
1.435 nicm 471: Like sessions, a
472: .Ql =
473: prefix will do an exact match only.
1.57 jmc 474: An empty window name specifies the next unused index if appropriate (for
475: example the
476: .Ic new-window
477: and
478: .Ic link-window
479: commands)
480: otherwise the current window in
481: .Em session
482: is chosen.
1.423 nicm 483: .Pp
1.424 nicm 484: The following special tokens are available to indicate particular windows.
485: Each has a single-character alternative form.
1.423 nicm 486: .Bl -column "XXXXXXXXXX" "X"
487: .It Sy "Token" Ta Sy "" Ta Sy "Meaning"
488: .It Li "{start}" Ta "^" Ta "The lowest-numbered window"
489: .It Li "{end}" Ta "$" Ta "The highest-numbered window"
490: .It Li "{last}" Ta "!" Ta "The last (previously current) window"
491: .It Li "{next}" Ta "+" Ta "The next window by number"
492: .It Li "{previous}" Ta "-" Ta "The previous window by number"
493: .El
1.1 nicm 494: .Pp
1.57 jmc 495: .Ar target-pane
1.472 nicm 496: (or
497: .Ar src-pane
498: or
499: .Ar dst-pane )
500: may be a pane ID or takes a similar form to
1.57 jmc 501: .Ar target-window
1.423 nicm 502: but with the optional addition of a period followed by a pane index or pane ID,
503: for example:
504: .Ql mysession:mywindow.1 .
1.57 jmc 505: If the pane index is omitted, the currently active pane in the specified
506: window is used.
1.423 nicm 507: The following special tokens are available for the pane index:
508: .Bl -column "XXXXXXXXXXXXXX" "X"
509: .It Sy "Token" Ta Sy "" Ta Sy "Meaning"
510: .It Li "{last}" Ta "!" Ta "The last (previously active) pane"
511: .It Li "{next}" Ta "+" Ta "The next pane by number"
512: .It Li "{previous}" Ta "-" Ta "The previous pane by number"
513: .It Li "{top}" Ta "" Ta "The top pane"
514: .It Li "{bottom}" Ta "" Ta "The bottom pane"
515: .It Li "{left}" Ta "" Ta "The leftmost pane"
516: .It Li "{right}" Ta "" Ta "The rightmost pane"
517: .It Li "{top-left}" Ta "" Ta "The top-left pane"
518: .It Li "{top-right}" Ta "" Ta "The top-right pane"
519: .It Li "{bottom-left}" Ta "" Ta "The bottom-left pane"
520: .It Li "{bottom-right}" Ta "" Ta "The bottom-right pane"
1.447 nicm 521: .It Li "{up-of}" Ta "" Ta "The pane above the active pane"
522: .It Li "{down-of}" Ta "" Ta "The pane below the active pane"
523: .It Li "{left-of}" Ta "" Ta "The pane to the left of the active pane"
524: .It Li "{right-of}" Ta "" Ta "The pane to the right of the active pane"
1.423 nicm 525: .El
1.177 nicm 526: .Pp
1.423 nicm 527: The tokens
1.177 nicm 528: .Ql +
529: and
530: .Ql -
531: may be followed by an offset, for example:
532: .Bd -literal -offset indent
533: select-window -t:+2
534: .Ed
535: .Pp
1.432 nicm 536: In addition,
537: .Em target-session ,
538: .Em target-window
539: or
540: .Em target-pane
541: may consist entirely of the token
542: .Ql {mouse}
543: (alternative form
544: .Ql = )
545: to specify the most recent mouse event
546: (see the
547: .Sx MOUSE SUPPORT
548: section)
549: or
550: .Ql {marked}
551: (alternative form
552: .Ql ~ )
553: to specify the marked pane (see
554: .Ic select-pane
555: .Fl m ) .
556: .Pp
1.423 nicm 557: Sessions, window and panes are each numbered with a unique ID; session IDs are
558: prefixed with a
559: .Ql $ ,
560: windows with a
561: .Ql @ ,
562: and panes with a
563: .Ql % .
564: These are unique and are unchanged for the life of the session, window or pane
565: in the
1.212 nicm 566: .Nm
1.423 nicm 567: server.
568: The pane ID is passed to the child process of the pane in the
1.212 nicm 569: .Ev TMUX_PANE
570: environment variable.
1.423 nicm 571: IDs may be displayed using the
572: .Ql session_id ,
573: .Ql window_id ,
574: or
575: .Ql pane_id
576: formats (see the
577: .Sx FORMATS
578: section) and the
579: .Ic display-message ,
580: .Ic list-sessions ,
581: .Ic list-windows
582: or
583: .Ic list-panes
584: commands.
1.15 jmc 585: .Pp
1.153 nicm 586: .Ar shell-command
587: arguments are
588: .Xr sh 1
589: commands.
1.394 nicm 590: This may be a single argument passed to the shell, for example:
1.153 nicm 591: .Bd -literal -offset indent
592: new-window 'vi /etc/passwd'
593: .Ed
1.394 nicm 594: .Pp
595: Will run:
596: .Bd -literal -offset indent
597: /bin/sh -c 'vi /etc/passwd'
598: .Ed
599: .Pp
600: Additionally, the
601: .Ic new-window ,
602: .Ic new-session ,
603: .Ic split-window ,
604: .Ic respawn-window
605: and
606: .Ic respawn-pane
607: commands allow
608: .Ar shell-command
609: to be given as multiple arguments and executed directly (without
610: .Ql sh -c ) .
611: This can avoid issues with shell quoting.
612: For example:
613: .Bd -literal -offset indent
614: $ tmux new-window vi /etc/passwd
615: .Ed
616: .Pp
617: Will run
618: .Xr vi 1
619: directly without invoking the shell.
1.153 nicm 620: .Pp
621: .Ar command
622: .Op Ar arguments
623: refers to a
624: .Nm
625: command, passed with the command and arguments separately, for example:
626: .Bd -literal -offset indent
627: bind-key F1 set-window-option force-width 81
628: .Ed
629: .Pp
630: Or if using
631: .Xr sh 1 :
632: .Bd -literal -offset indent
633: $ tmux bind-key F1 set-window-option force-width 81
634: .Ed
635: .Pp
1.57 jmc 636: Multiple commands may be specified together as part of a
637: .Em command sequence .
638: Each command should be separated by spaces and a semicolon;
1.244 nicm 639: commands are executed sequentially from left to right and
1.293 nicm 640: lines ending with a backslash continue on to the next line,
641: except when escaped by another backslash.
1.57 jmc 642: A literal semicolon may be included by escaping it with a backslash (for
643: example, when specifying a command sequence to
644: .Ic bind-key ) .
1.13 nicm 645: .Pp
1.153 nicm 646: Example
647: .Nm
648: commands include:
1.13 nicm 649: .Bd -literal -offset indent
1.57 jmc 650: refresh-client -t/dev/ttyp2
651:
652: rename-session -tfirst newname
653:
654: set-window-option -t:0 monitor-activity on
655:
656: new-window ; split-window -d
1.244 nicm 657:
658: bind-key R source-file ~/.tmux.conf \e; \e
659: display-message "source-file done"
1.13 nicm 660: .Ed
1.153 nicm 661: .Pp
662: Or from
663: .Xr sh 1 :
664: .Bd -literal -offset indent
665: $ tmux kill-window -t :1
666:
1.159 jmc 667: $ tmux new-window \e; split-window -d
1.153 nicm 668:
1.159 jmc 669: $ tmux new-session -d 'vi /etc/passwd' \e; split-window -d \e; attach
1.153 nicm 670: .Ed
1.57 jmc 671: .Sh CLIENTS AND SESSIONS
1.153 nicm 672: The
673: .Nm
674: server manages clients, sessions, windows and panes.
675: Clients are attached to sessions to interact with them, either
676: when they are created with the
677: .Ic new-session
678: command, or later with the
679: .Ic attach-session
680: command.
1.188 nicm 681: Each session has one or more windows
1.153 nicm 682: .Em linked
683: into it.
684: Windows may be linked to multiple sessions and are made up of one or
685: more panes,
686: each of which contains a pseudo terminal.
687: Commands for creating, linking and otherwise manipulating windows
688: are covered
689: in the
690: .Sx WINDOWS AND PANES
691: section.
692: .Pp
693: The following commands are available to manage clients and sessions:
1.57 jmc 694: .Bl -tag -width Ds
695: .It Xo Ic attach-session
1.436 nicm 696: .Op Fl dEr
1.372 nicm 697: .Op Fl c Ar working-directory
1.57 jmc 698: .Op Fl t Ar target-session
699: .Xc
700: .D1 (alias: Ic attach )
701: If run from outside
702: .Nm ,
703: create a new client in the current terminal and attach it to
704: .Ar target-session .
705: If used from inside, switch the current client.
706: If
707: .Fl d
708: is specified, any other clients attached to the session are detached.
1.148 nicm 709: .Fl r
710: signifies the client is read-only (only keys bound to the
711: .Ic detach-client
1.242 nicm 712: or
713: .Ic switch-client
714: commands have any effect)
1.13 nicm 715: .Pp
1.57 jmc 716: If no server is started,
717: .Ic attach-session
718: will attempt to start it; this will fail unless sessions are created in the
719: configuration file.
1.217 nicm 720: .Pp
721: The
722: .Ar target-session
723: rules for
724: .Ic attach-session
725: are slightly adjusted: if
726: .Nm
727: needs to select the most recently used session, it will prefer the most
728: recently used
729: .Em unattached
730: session.
1.372 nicm 731: .Pp
732: .Fl c
733: will set the session working directory (used for new windows) to
734: .Ar working-directory .
1.436 nicm 735: .Pp
736: If
737: .Fl E
1.480 nicm 738: is used, the
1.436 nicm 739: .Ic update-environment
740: option will not be applied.
1.211 nicm 741: .It Xo Ic detach-client
1.463 nicm 742: .Op Fl aP
1.525 nicm 743: .Op Fl E Ar shell-command
1.219 nicm 744: .Op Fl s Ar target-session
1.211 nicm 745: .Op Fl t Ar target-client
746: .Xc
1.57 jmc 747: .D1 (alias: Ic detach )
1.218 nicm 748: Detach the current client if bound to a key, the client specified with
749: .Fl t ,
1.258 jmc 750: or all clients currently attached to the session specified by
1.218 nicm 751: .Fl s .
1.296 nicm 752: The
753: .Fl a
754: option kills all but the client given with
755: .Fl t .
1.211 nicm 756: If
757: .Fl P
758: is given, send SIGHUP to the parent process of the client, typically causing it
759: to exit.
1.525 nicm 760: With
761: .Fl E ,
762: run
763: .Ar shell-command
764: to replace the client.
1.57 jmc 765: .It Ic has-session Op Fl t Ar target-session
766: .D1 (alias: Ic has )
767: Report an error and exit with 1 if the specified session does not exist.
768: If it does exist, exit with 0.
769: .It Ic kill-server
770: Kill the
1.1 nicm 771: .Nm
1.57 jmc 772: server and clients and destroy all sessions.
1.369 nicm 773: .It Xo Ic kill-session
1.464 nicm 774: .Op Fl aC
1.297 nicm 775: .Op Fl t Ar target-session
1.369 nicm 776: .Xc
1.57 jmc 777: Destroy the given session, closing any windows linked to it and no other
778: sessions, and detaching all clients attached to it.
1.297 nicm 779: If
780: .Fl a
781: is given, all sessions but the specified one is killed.
1.464 nicm 782: The
783: .Fl C
1.467 nicm 784: flag clears alerts (bell, activity, or silence) in all windows linked to the
1.464 nicm 785: session.
1.250 nicm 786: .It Xo Ic list-clients
787: .Op Fl F Ar format
788: .Op Fl t Ar target-session
789: .Xc
1.57 jmc 790: .D1 (alias: Ic lsc )
1.221 jmc 791: List all clients attached to the server.
1.250 nicm 792: For the meaning of the
793: .Fl F
794: flag, see the
1.252 jmc 795: .Sx FORMATS
796: section.
1.221 jmc 797: If
1.220 nicm 798: .Ar target-session
799: is specified, list only clients connected to that session.
1.489 nicm 800: .It Xo Ic list-commands
801: .Op Fl F Ar format
802: .Xc
1.57 jmc 803: .D1 (alias: Ic lscm )
804: List the syntax of all commands supported by
805: .Nm .
1.247 nicm 806: .It Ic list-sessions Op Fl F Ar format
1.57 jmc 807: .D1 (alias: Ic ls )
808: List all sessions managed by the server.
1.247 nicm 809: For the meaning of the
810: .Fl F
811: flag, see the
812: .Sx FORMATS
813: section.
1.175 nicm 814: .It Ic lock-client Op Fl t Ar target-client
815: .D1 (alias: Ic lockc )
1.92 nicm 816: Lock
817: .Ar target-client ,
818: see the
819: .Ic lock-server
820: command.
1.175 nicm 821: .It Ic lock-session Op Fl t Ar target-session
822: .D1 (alias: Ic locks )
1.92 nicm 823: Lock all clients attached to
824: .Ar target-session .
1.57 jmc 825: .It Xo Ic new-session
1.436 nicm 826: .Op Fl AdDEP
1.371 nicm 827: .Op Fl c Ar start-directory
1.351 nicm 828: .Op Fl F Ar format
1.57 jmc 829: .Op Fl n Ar window-name
830: .Op Fl s Ar session-name
1.536 nicm 831: .Op Fl t Ar group-name
1.210 nicm 832: .Op Fl x Ar width
833: .Op Fl y Ar height
1.153 nicm 834: .Op Ar shell-command
1.57 jmc 835: .Xc
836: .D1 (alias: Ic new )
837: Create a new session with name
838: .Ar session-name .
1.153 nicm 839: .Pp
1.57 jmc 840: The new session is attached to the current terminal unless
841: .Fl d
842: is given.
843: .Ar window-name
1.1 nicm 844: and
1.153 nicm 845: .Ar shell-command
846: are the name of and shell command to execute in the initial window.
1.552 nicm 847: With
848: .Fl d ,
849: the initial size is 80 x 24;
1.210 nicm 850: .Fl x
851: and
852: .Fl y
1.552 nicm 853: can be used to specify a different size.
1.68 nicm 854: .Pp
855: If run from a terminal, any
856: .Xr termios 4
857: special characters are saved and used for new windows in the new session.
1.338 nicm 858: .Pp
859: The
860: .Fl A
861: flag makes
862: .Ic new-session
863: behave like
864: .Ic attach-session
865: if
866: .Ar session-name
1.416 nicm 867: already exists; in this case,
1.338 nicm 868: .Fl D
869: behaves like
870: .Fl d
871: to
872: .Ic attach-session .
1.101 nicm 873: .Pp
874: If
875: .Fl t
1.536 nicm 876: is given, it specifies a
877: .Ic session group .
878: Sessions in the same group share the same set of windows - new windows are
1.537 nicm 879: linked to all sessions in the group and any windows closed removed from all
1.536 nicm 880: sessions.
1.101 nicm 881: The current and previous window and any session options remain independent and
1.536 nicm 882: any session in a group may be killed without affecting the others.
883: The
884: .Ar group-name
885: argument may be:
886: .Bl -enum -width Ds
887: .It
888: the name of an existing group, in which case the new session is added to that
889: group;
890: .It
891: the name of an existing session - the new session is added to the same group
892: as that session, creating a new group if necessary;
893: .It
894: the name for a new group containing only the new session.
895: .El
896: .Pp
1.101 nicm 897: .Fl n
1.480 nicm 898: and
1.153 nicm 899: .Ar shell-command
1.101 nicm 900: are invalid if
901: .Fl t
902: is used.
1.351 nicm 903: .Pp
904: The
905: .Fl P
906: option prints information about the new session after it has been created.
907: By default, it uses the format
908: .Ql #{session_name}:
909: but a different format may be specified with
910: .Fl F .
1.436 nicm 911: .Pp
912: If
913: .Fl E
1.480 nicm 914: is used, the
1.436 nicm 915: .Ic update-environment
916: option will not be applied.
1.248 nicm 917: .It Xo Ic refresh-client
1.535 nicm 918: .Op Fl C Ar width,height
1.248 nicm 919: .Op Fl S
920: .Op Fl t Ar target-client
921: .Xc
1.57 jmc 922: .D1 (alias: Ic refresh )
923: Refresh the current client if bound to a key, or a single client if one is given
924: with
925: .Fl t .
1.248 nicm 926: If
927: .Fl S
1.538 nicm 928: is specified, only update the client's status line.
1.535 nicm 929: .Pp
930: .Fl C
931: sets the width and height of a control client.
1.57 jmc 932: .It Xo Ic rename-session
933: .Op Fl t Ar target-session
934: .Ar new-name
935: .Xc
936: .D1 (alias: Ic rename )
937: Rename the session to
938: .Ar new-name .
1.121 nicm 939: .It Xo Ic show-messages
1.465 nicm 940: .Op Fl JT
1.120 nicm 941: .Op Fl t Ar target-client
942: .Xc
943: .D1 (alias: Ic showmsgs )
1.377 nicm 944: Show client messages or server information.
1.120 nicm 945: Any messages displayed on the status line are saved in a per-client message
946: log, up to a maximum of the limit set by the
947: .Ar message-limit
1.384 nicm 948: server option.
1.377 nicm 949: With
950: .Fl t ,
951: display the log for
1.120 nicm 952: .Ar target-client .
1.377 nicm 953: .Fl J
954: and
955: .Fl T
1.465 nicm 956: show debugging information about jobs and terminals.
1.488 tim 957: .It Xo Ic source-file
958: .Op Fl q
959: .Ar path
960: .Xc
1.57 jmc 961: .D1 (alias: Ic source )
962: Execute commands from
1.519 nicm 963: .Ar path
964: (which may be a
965: .Xr glob 3
966: pattern).
1.488 tim 967: If
968: .Fl q
969: is given, no error will be returned if
970: .Ar path
971: does not exist.
1.521 nicm 972: .Pp
973: Within a configuration file, commands may be made conditional by surrounding
974: them with
975: .Em %if
976: and
977: .Em %endif
978: lines.
979: The argument to
980: .Em %if
981: is expanded as a format and if it evaluates to false
1.522 jmc 982: (zero or empty), subsequent lines are ignored until
1.521 nicm 983: .Em %endif .
984: For example:
985: .Bd -literal -offset indent
986: %if #{==:#{host},myhost}
987: set -g status-style bg=red
988: %endif
989: .Ed
990: .Pp
991: Will change the status line to red if running on
992: .Ql myhost .
993: .Em %if
994: may not be nested.
1.57 jmc 995: .It Ic start-server
996: .D1 (alias: Ic start )
997: Start the
1.1 nicm 998: .Nm
1.57 jmc 999: server, if not already running, without creating any sessions.
1000: .It Xo Ic suspend-client
1.202 nicm 1001: .Op Fl t Ar target-client
1.57 jmc 1002: .Xc
1003: .D1 (alias: Ic suspendc )
1004: Suspend a client by sending
1005: .Dv SIGTSTP
1006: (tty stop).
1007: .It Xo Ic switch-client
1.436 nicm 1008: .Op Fl Elnpr
1.57 jmc 1009: .Op Fl c Ar target-client
1010: .Op Fl t Ar target-session
1.421 nicm 1011: .Op Fl T Ar key-table
1.57 jmc 1012: .Xc
1013: .D1 (alias: Ic switchc )
1014: Switch the current session for client
1015: .Ar target-client
1016: to
1017: .Ar target-session .
1.183 nicm 1018: If
1.197 jmc 1019: .Fl l ,
1.183 nicm 1020: .Fl n
1021: or
1022: .Fl p
1.194 nicm 1023: is used, the client is moved to the last, next or previous session
1024: respectively.
1.242 nicm 1025: .Fl r
1026: toggles whether a client is read-only (see the
1027: .Ic attach-session
1028: command).
1.436 nicm 1029: .Pp
1030: If
1031: .Fl E
1032: is used,
1033: .Ic update-environment
1034: option will not be applied.
1.421 nicm 1035: .Pp
1036: .Fl T
1037: sets the client's key table; the next key from the client will be interpreted from
1038: .Ar key-table .
1039: This may be used to configure multiple prefix keys, or to bind commands to
1040: sequences of keys.
1041: For example, to make typing
1042: .Ql abc
1043: run the
1044: .Ic list-keys
1045: command:
1046: .Bd -literal -offset indent
1047: bind-key -Ttable2 c list-keys
1048: bind-key -Ttable1 b switch-client -Ttable2
1049: bind-key -Troot a switch-client -Ttable1
1050: .Ed
1.57 jmc 1051: .El
1052: .Sh WINDOWS AND PANES
1.1 nicm 1053: A
1054: .Nm
1.493 nicm 1055: window may be in one of two modes.
1.1 nicm 1056: The default permits direct access to the terminal attached to the window.
1.164 nicm 1057: The other is copy mode, which permits a section of a window or its
1058: history to be copied to a
1.1 nicm 1059: .Em paste buffer
1060: for later insertion into another window.
1061: This mode is entered with the
1062: .Ic copy-mode
1063: command, bound to
1.113 nicm 1064: .Ql \&[
1.1 nicm 1065: by default.
1.164 nicm 1066: It is also entered when a command that produces output, such as
1067: .Ic list-keys ,
1068: is executed from a key binding.
1.1 nicm 1069: .Pp
1.497 nicm 1070: Commands are sent to copy mode using the
1071: .Fl X
1072: flag to the
1073: .Ic send-keys
1074: command.
1075: When a key is pressed, copy mode automatically uses one of two key tables,
1076: depending on the
1.1 nicm 1077: .Ic mode-keys
1.497 nicm 1078: option:
1079: .Ic copy-mode
1080: for emacs, or
1081: .Ic copy-mode-vi
1082: for vi.
1083: Key tables may be viewed with the
1084: .Ic list-keys
1085: command.
1086: .Pp
1087: The following commands are supported in copy mode:
1.517 nicm 1088: .Bl -column "CommandXXXXXXXXXXXXXXXXXXXXXXXXXX" "viXXXXXXXXXX" "emacs" -offset indent
1.497 nicm 1089: .It Sy "Command" Ta Sy "vi" Ta Sy "emacs"
1090: .It Li "append-selection" Ta "" Ta ""
1091: .It Li "append-selection-and-cancel" Ta "A" Ta ""
1092: .It Li "back-to-indentation" Ta "^" Ta "M-m"
1093: .It Li "begin-selection" Ta "Space" Ta "C-Space"
1094: .It Li "bottom-line" Ta "L" Ta ""
1095: .It Li "cancel" Ta "q" Ta "Escape"
1096: .It Li "clear-selection" Ta "Escape" Ta "C-g"
1097: .It Li "copy-end-of-line" Ta "D" Ta "C-k"
1098: .It Li "copy-line" Ta "" Ta ""
1099: .It Li "copy-pipe <command>" Ta "" Ta ""
1.514 nicm 1100: .It Li "copy-pipe-and-cancel <command>" Ta "" Ta ""
1.497 nicm 1101: .It Li "copy-selection" Ta "" Ta ""
1102: .It Li "copy-selection-and-cancel" Ta "Enter" Ta "M-w"
1103: .It Li "cursor-down" Ta "j" Ta "Down"
1104: .It Li "cursor-left" Ta "h" Ta "Left"
1105: .It Li "cursor-right" Ta "l" Ta "Right"
1106: .It Li "cursor-up" Ta "k" Ta "Up"
1107: .It Li "end-of-line" Ta "$" Ta "C-e"
1108: .It Li "goto-line <line>" Ta ":" Ta "g"
1109: .It Li "halfpage-down" Ta "C-d" Ta "M-Down"
1110: .It Li "halfpage-up" Ta "C-u" Ta "M-Up"
1111: .It Li "history-bottom" Ta "G" Ta "M-<"
1112: .It Li "history-top" Ta "g" Ta "M->"
1113: .It Li "jump-again" Ta ";" Ta ";"
1114: .It Li "jump-backward <to>" Ta "F" Ta "F"
1115: .It Li "jump-forward <to>" Ta "f" Ta "f"
1116: .It Li "jump-reverse" Ta "," Ta ","
1117: .It Li "jump-to-backward <to>" Ta "T" Ta ""
1118: .It Li "jump-to-forward <to>" Ta "t" Ta ""
1119: .It Li "middle-line" Ta "M" Ta "M-r"
1120: .It Li "next-paragraph" Ta "}" Ta "M-}"
1121: .It Li "next-space" Ta "W" Ta ""
1122: .It Li "next-space-end" Ta "E" Ta ""
1123: .It Li "next-word" Ta "w" Ta ""
1124: .It Li "next-word-end" Ta "e" Ta "M-f"
1125: .It Li "other-end" Ta "o" Ta ""
1126: .It Li "page-down" Ta "C-f" Ta "PageDown"
1127: .It Li "page-up" Ta "C-b" Ta "PageUp"
1128: .It Li "previous-paragraph" Ta "{" Ta "M-{"
1129: .It Li "previous-space" Ta "B" Ta ""
1130: .It Li "previous-word" Ta "b" Ta "M-b"
1131: .It Li "rectangle-toggle" Ta "v" Ta "R"
1132: .It Li "scroll-down" Ta "C-e" Ta "C-Down"
1133: .It Li "scroll-up" Ta "C-y" Ta "C-Up"
1134: .It Li "search-again" Ta "n" Ta "n"
1.517 nicm 1135: .It Li "search-backward <for>" Ta "?" Ta ""
1136: .It Li "search-forward <for>" Ta "/" Ta ""
1137: .It Li "search-backward-incremental <for>" Ta "" Ta "C-r"
1138: .It Li "search-forward-incremental <for>" Ta "" Ta "C-s"
1.497 nicm 1139: .It Li "search-reverse" Ta "N" Ta "N"
1140: .It Li "select-line" Ta "V" Ta ""
1141: .It Li "start-of-line" Ta "0" Ta "C-a"
1.515 nicm 1142: .It Li "stop-selection" Ta "" Ta ""
1.497 nicm 1143: .It Li "top-line" Ta "H" Ta "M-R"
1.1 nicm 1144: .El
1.146 nicm 1145: .Pp
1146: The next and previous word keys use space and the
1147: .Ql - ,
1.154 nicm 1148: .Ql _
1.146 nicm 1149: and
1150: .Ql @
1.154 nicm 1151: characters as word delimiters by default, but this can be adjusted by
1152: setting the
1153: .Em word-separators
1.255 nicm 1154: session option.
1.146 nicm 1155: Next word moves to the start of the next word, next word end to the end of the
1156: next word and previous word to the start of the previous word.
1157: The three next and previous space keys work similarly but use a space alone as
1158: the word separator.
1.157 nicm 1159: .Pp
1160: The jump commands enable quick movement within a line.
1161: For instance, typing
1162: .Ql f
1163: followed by
1164: .Ql /
1165: will move the cursor to the next
1166: .Ql /
1167: character on the current line.
1168: A
1169: .Ql \&;
1170: will then jump to the next occurrence.
1.1 nicm 1171: .Pp
1.155 nicm 1172: Commands in copy mode may be prefaced by an optional repeat count.
1173: With vi key bindings, a prefix is entered using the number keys; with
1174: emacs, the Alt (meta) key and a number begins prefix entry.
1175: .Pp
1.164 nicm 1176: The synopsis for the
1177: .Ic copy-mode
1178: command is:
1.57 jmc 1179: .Bl -tag -width Ds
1180: .It Xo Ic copy-mode
1.450 nicm 1181: .Op Fl Meu
1.72 nicm 1182: .Op Fl t Ar target-pane
1.57 jmc 1183: .Xc
1184: Enter copy mode.
1185: The
1186: .Fl u
1187: option scrolls one page up.
1.419 nicm 1188: .Fl M
1189: begins a mouse drag (only valid if bound to a mouse key binding, see
1.420 jmc 1190: .Sx MOUSE SUPPORT ) .
1.450 nicm 1191: .Fl e
1192: specifies that scrolling to the bottom of the history (to the visible screen)
1193: should exit copy mode.
1194: While in copy mode, pressing a key other than those used for scrolling will
1195: disable this behaviour.
1196: This is intended to allow fast scrolling through a pane's history, for
1197: example with:
1198: .Bd -literal -offset indent
1199: bind PageUp copy-mode -eu
1200: .Ed
1.57 jmc 1201: .El
1.18 nicm 1202: .Pp
1.1 nicm 1203: Each window displayed by
1204: .Nm
1205: may be split into one or more
1206: .Em panes ;
1207: each pane takes up a certain area of the display and is a separate terminal.
1208: A window may be split into panes using the
1209: .Ic split-window
1210: command.
1.38 nicm 1211: Windows may be split horizontally (with the
1212: .Fl h
1213: flag) or vertically.
1214: Panes may be resized with the
1215: .Ic resize-pane
1.1 nicm 1216: command (bound to
1.523 nicm 1217: .Ql C-Up ,
1218: .Ql C-Down
1219: .Ql C-Left
1.38 nicm 1220: and
1.523 nicm 1221: .Ql C-Right
1.1 nicm 1222: by default), the current pane may be changed with the
1.156 nicm 1223: .Ic select-pane
1224: command and the
1.1 nicm 1225: .Ic rotate-window
1226: and
1227: .Ic swap-pane
1.38 nicm 1228: commands may be used to swap panes without changing their position.
1229: Panes are numbered beginning from zero in the order they are created.
1230: .Pp
1231: A number of preset
1232: .Em layouts
1233: are available.
1234: These may be selected with the
1235: .Ic select-layout
1236: command or cycled with
1237: .Ic next-layout
1238: (bound to
1.149 nicm 1239: .Ql Space
1.131 nicm 1240: by default); once a layout is chosen, panes within it may be moved and resized
1241: as normal.
1.1 nicm 1242: .Pp
1243: The following layouts are supported:
1244: .Bl -tag -width Ds
1245: .It Ic even-horizontal
1246: Panes are spread out evenly from left to right across the window.
1247: .It Ic even-vertical
1248: Panes are spread evenly from top to bottom.
1.2 nicm 1249: .It Ic main-horizontal
1.131 nicm 1250: A large (main) pane is shown at the top of the window and the remaining panes
1251: are spread from left to right in the leftover space at the bottom.
1.2 nicm 1252: Use the
1253: .Em main-pane-height
1254: window option to specify the height of the top pane.
1.1 nicm 1255: .It Ic main-vertical
1.2 nicm 1256: Similar to
1257: .Ic main-horizontal
1258: but the large pane is placed on the left and the others spread from top to
1259: bottom along the right.
1260: See the
1261: .Em main-pane-width
1262: window option.
1.165 nicm 1263: .It Ic tiled
1264: Panes are spread out as evenly as possible over the window in both rows and
1265: columns.
1.1 nicm 1266: .El
1.8 nicm 1267: .Pp
1.181 nicm 1268: In addition,
1269: .Ic select-layout
1270: may be used to apply a previously used layout - the
1271: .Ic list-windows
1272: command displays the layout of each window in a form suitable for use with
1273: .Ic select-layout .
1274: For example:
1275: .Bd -literal -offset indent
1276: $ tmux list-windows
1277: 0: ksh [159x48]
1278: layout: bb62,159x48,0,0{79x48,0,0,79x48,80,0}
1279: $ tmux select-layout bb62,159x48,0,0{79x48,0,0,79x48,80,0}
1280: .Ed
1.196 nicm 1281: .Pp
1.181 nicm 1282: .Nm
1283: automatically adjusts the size of the layout for the current window size.
1284: Note that a layout cannot be applied to a window with more panes than that
1285: from which the layout was originally defined.
1286: .Pp
1.57 jmc 1287: Commands related to windows and panes are as follows:
1288: .Bl -tag -width Ds
1289: .It Xo Ic break-pane
1.280 nicm 1290: .Op Fl dP
1291: .Op Fl F Ar format
1.532 nicm 1292: .Op Fl n Ar window-name
1.440 nicm 1293: .Op Fl s Ar src-pane
1.480 nicm 1294: .Op Fl t Ar dst-window
1.57 jmc 1295: .Xc
1296: .D1 (alias: Ic breakp )
1297: Break
1.440 nicm 1298: .Ar src-pane
1299: off from its containing window to make it the only pane in
1300: .Ar dst-window .
1.57 jmc 1301: If
1302: .Fl d
1303: is given, the new window does not become the current window.
1.280 nicm 1304: The
1305: .Fl P
1306: option prints information about the new window after it has been created.
1307: By default, it uses the format
1308: .Ql #{session_name}:#{window_index}
1309: but a different format may be specified with
1310: .Fl F .
1.128 nicm 1311: .It Xo Ic capture-pane
1.506 nicm 1312: .Op Fl aepPqCJ
1.392 nicm 1313: .Op Fl b Ar buffer-name
1.213 nicm 1314: .Op Fl E Ar end-line
1315: .Op Fl S Ar start-line
1.128 nicm 1316: .Op Fl t Ar target-pane
1317: .Xc
1318: .D1 (alias: Ic capturep )
1.322 nicm 1319: Capture the contents of a pane.
1320: If
1321: .Fl p
1.325 nicm 1322: is given, the output goes to stdout, otherwise to the buffer specified with
1.322 nicm 1323: .Fl b
1324: or a new buffer if omitted.
1.339 nicm 1325: If
1326: .Fl a
1327: is given, the alternate screen is used, and the history is not accessible.
1.340 nicm 1328: If no alternate screen exists, an error will be returned unless
1329: .Fl q
1330: is given.
1.326 nicm 1331: If
1332: .Fl e
1.328 nicm 1333: is given, the output includes escape sequences for text and background
1334: attributes.
1335: .Fl C
1.330 nicm 1336: also escapes non-printable characters as octal \exxx.
1.328 nicm 1337: .Fl J
1.341 nicm 1338: joins wrapped lines and preserves trailing spaces at each line's end.
1.346 nicm 1339: .Fl P
1340: captures only any output that the pane has received that is the beginning of an
1341: as-yet incomplete escape sequence.
1.213 nicm 1342: .Pp
1343: .Fl S
1344: and
1345: .Fl E
1346: specify the starting and ending line numbers, zero is the first line of the
1347: visible pane and negative numbers are lines in the history.
1.397 nicm 1348: .Ql -
1349: to
1350: .Fl S
1351: is the start of the history and to
1352: .Fl E
1353: the end of the visible pane.
1.213 nicm 1354: The default is to capture only the visible contents of the pane.
1.76 nicm 1355: .It Xo
1356: .Ic choose-client
1.562 nicm 1357: .Op Fl f Ar filter
1.561 nicm 1358: .Op Fl O Ar sort-order
1.555 nicm 1359: .Op Fl t Ar target-pane
1.76 nicm 1360: .Op Ar template
1361: .Xc
1.555 nicm 1362: Put a pane into client mode, allowing a client to be selected interactively from
1363: a list.
1364: The following keys may be used in client mode:
1365: .Bl -column "Key" "Function" -offset indent
1366: .It Sy "Key" Ta Sy "Function"
1367: .It Li "Enter" Ta "Choose selected client"
1368: .It Li "Up" Ta "Select previous client"
1369: .It Li "Down" Ta "Select next client"
1.559 nicm 1370: .It Li "C-s" Ta "Search by name"
1371: .It Li "n" Ta "Repeat last search"
1.555 nicm 1372: .It Li "t" Ta "Toggle if client is tagged"
1373: .It Li "T" Ta "Tag no clients"
1374: .It Li "C-t" Ta "Tag all clients"
1375: .It Li "d" Ta "Detach selected client"
1376: .It Li "D" Ta "Detach tagged clients"
1377: .It Li "x" Ta "Detach and HUP selected client"
1378: .It Li "X" Ta "Detach and HUP tagged clients"
1379: .It Li "z" Ta "Suspend selected client"
1380: .It Li "Z" Ta "Suspend tagged clients"
1.562 nicm 1381: .It Li "f" Ta "Enter a format to filter items"
1.555 nicm 1382: .It Li "O" Ta "Change sort order"
1383: .It Li "q" Ta "Exit mode"
1384: .El
1385: .Pp
1.76 nicm 1386: After a client is chosen,
1387: .Ql %%
1.555 nicm 1388: is replaced by the client name in
1.76 nicm 1389: .Ar template
1390: and the result executed as a command.
1391: If
1392: .Ar template
1393: is not given, "detach-client -t '%%'" is used.
1.555 nicm 1394: .Pp
1.561 nicm 1395: .Fl O
1396: specifies the initial sort order: one of
1397: .Ql name ,
1398: .Ql size ,
1399: .Ql creation ,
1400: or
1401: .Ql activity .
1.562 nicm 1402: .Fl f
1403: specifies an initial filter.
1.314 nicm 1404: This command works only if at least one client is attached.
1.76 nicm 1405: .It Xo
1.555 nicm 1406: .Ic choose-tree
1407: .Op Fl sw
1.562 nicm 1408: .Op Fl f Ar filter
1.561 nicm 1409: .Op Fl O Ar sort-order
1.555 nicm 1410: .Op Fl t Ar target-pane
1.76 nicm 1411: .Op Ar template
1412: .Xc
1.555 nicm 1413: Put a pane into tree mode, where a session, window or pane may be chosen
1.76 nicm 1414: interactively from a list.
1.298 nicm 1415: .Fl s
1.555 nicm 1416: starts with sessions collapsed and
1.298 nicm 1417: .Fl w
1.555 nicm 1418: with windows collapsed.
1419: The following keys may be used in tree mode:
1420: .Bl -column "Key" "Function" -offset indent
1421: .It Sy "Key" Ta Sy "Function"
1422: .It Li "Enter" Ta "Choose selected item"
1423: .It Li "Up" Ta "Select previous item"
1424: .It Li "Down" Ta "Select next item"
1.566 nicm 1425: .It Li "<" Ta "Scroll list of previews left"
1426: .It Li ">" Ta "Scroll list of previews right"
1.559 nicm 1427: .It Li "C-s" Ta "Search by name"
1428: .It Li "n" Ta "Repeat last search"
1.555 nicm 1429: .It Li "t" Ta "Toggle if item is tagged"
1430: .It Li "T" Ta "Tag no items"
1431: .It Li "C-t" Ta "Tag all items"
1.557 nicm 1432: .It Li "\&:" Ta "Run a command for each tagged item"
1.555 nicm 1433: .It Li "f" Ta "Enter a format to filter items"
1434: .It Li "O" Ta "Change sort order"
1435: .It Li "q" Ta "Exit mode"
1436: .El
1.320 nicm 1437: .Pp
1.555 nicm 1438: After a session, window or pane is chosen,
1.76 nicm 1439: .Ql %%
1.555 nicm 1440: is replaced by the target in
1.76 nicm 1441: .Ar template
1442: and the result executed as a command.
1443: If
1444: .Ar template
1.555 nicm 1445: is not given, "switch-client -t '%%'" is used.
1446: .Pp
1.561 nicm 1447: .Fl O
1448: specifies the initial sort order: one of
1449: .Ql index ,
1450: .Ql name ,
1451: or
1452: .Ql time .
1.562 nicm 1453: .Fl f
1454: specifies an initial filter.
1.314 nicm 1455: This command works only if at least one client is attached.
1.491 nicm 1456: .It Xo
1457: .Ic display-panes
1458: .Op Fl t Ar target-client
1459: .Op Ar template
1460: .Xc
1.398 nicm 1461: .D1 (alias: Ic displayp )
1.78 nicm 1462: Display a visible indicator of each pane shown by
1463: .Ar target-client .
1464: See the
1.145 nicm 1465: .Ic display-panes-time ,
1466: .Ic display-panes-colour ,
1.78 nicm 1467: and
1.145 nicm 1468: .Ic display-panes-active-colour
1.78 nicm 1469: session options.
1.491 nicm 1470: While the indicator is on screen, a pane may be chosen with the
1.84 nicm 1471: .Ql 0
1472: to
1473: .Ql 9
1.491 nicm 1474: keys, which will cause
1475: .Ar template
1476: to be executed as a command with
1477: .Ql %%
1478: substituted by the pane ID.
1479: The default
1480: .Ar template
1481: is "select-pane -t '%%'".
1.57 jmc 1482: .It Xo Ic find-window
1.285 nicm 1483: .Op Fl CNT
1.555 nicm 1484: .Op Fl t Ar target-pane
1.57 jmc 1485: .Ar match-string
1486: .Xc
1487: .D1 (alias: Ic findw )
1488: Search for the
1489: .Xr fnmatch 3
1490: pattern
1491: .Ar match-string
1492: in window names, titles, and visible content (but not history).
1.285 nicm 1493: The flags control matching behavior:
1494: .Fl C
1495: matches only visible window contents,
1496: .Fl N
1497: matches only the window name and
1498: .Fl T
1499: matches only the window title.
1500: The default is
1501: .Fl CNT .
1.555 nicm 1502: .Pp
1.314 nicm 1503: This command works only if at least one client is attached.
1.137 nicm 1504: .It Xo Ic join-pane
1.277 nicm 1505: .Op Fl bdhv
1.137 nicm 1506: .Oo Fl l
1507: .Ar size |
1508: .Fl p Ar percentage Oc
1509: .Op Fl s Ar src-pane
1510: .Op Fl t Ar dst-pane
1511: .Xc
1512: .D1 (alias: Ic joinp )
1513: Like
1514: .Ic split-window ,
1515: but instead of splitting
1516: .Ar dst-pane
1517: and creating a new pane, split it and move
1518: .Ar src-pane
1519: into the space.
1520: This can be used to reverse
1521: .Ic break-pane .
1.277 nicm 1522: The
1523: .Fl b
1524: option causes
1525: .Ar src-pane
1526: to be joined to left of or above
1527: .Ar dst-pane .
1.432 nicm 1528: .Pp
1529: If
1530: .Fl s
1531: is omitted and a marked pane is present (see
1532: .Ic select-pane
1533: .Fl m ) ,
1534: the marked pane is used rather than the current pane.
1.112 nicm 1535: .It Xo Ic kill-pane
1536: .Op Fl a
1537: .Op Fl t Ar target-pane
1538: .Xc
1.57 jmc 1539: .D1 (alias: Ic killp )
1540: Destroy the given pane.
1541: If no panes remain in the containing window, it is also destroyed.
1.112 nicm 1542: The
1543: .Fl a
1544: option kills all but the pane given with
1545: .Fl t .
1.289 nicm 1546: .It Xo Ic kill-window
1547: .Op Fl a
1548: .Op Fl t Ar target-window
1549: .Xc
1.57 jmc 1550: .D1 (alias: Ic killw )
1551: Kill the current window or the window at
1552: .Ar target-window ,
1.1 nicm 1553: removing it from any sessions to which it is linked.
1.289 nicm 1554: The
1555: .Fl a
1556: option kills all but the window given with
1557: .Fl t .
1.398 nicm 1558: .It Xo Ic last-pane
1559: .Op Fl de
1560: .Op Fl t Ar target-window
1561: .Xc
1.187 nicm 1562: .D1 (alias: Ic lastp )
1563: Select the last (previously selected) pane.
1.398 nicm 1564: .Fl e
1565: enables or
1566: .Fl d
1567: disables input to the pane.
1.56 jmc 1568: .It Ic last-window Op Fl t Ar target-session
1.1 nicm 1569: .D1 (alias: Ic last )
1570: Select the last (previously selected) window.
1571: If no
1572: .Ar target-session
1573: is specified, select the last window of the current session.
1574: .It Xo Ic link-window
1.439 nicm 1575: .Op Fl adk
1.1 nicm 1576: .Op Fl s Ar src-window
1577: .Op Fl t Ar dst-window
1578: .Xc
1579: .D1 (alias: Ic linkw )
1580: Link the window at
1581: .Ar src-window
1582: to the specified
1583: .Ar dst-window .
1584: If
1585: .Ar dst-window
1586: is specified and no such window exists, the
1587: .Ar src-window
1588: is linked there.
1.439 nicm 1589: With
1590: .Fl a ,
1591: the window is moved to the next index up (following windows
1592: are moved if necessary).
1.1 nicm 1593: If
1594: .Fl k
1595: is given and
1596: .Ar dst-window
1597: exists, it is killed, otherwise an error is generated.
1598: If
1599: .Fl d
1600: is given, the newly linked window is not selected.
1.214 nicm 1601: .It Xo Ic list-panes
1602: .Op Fl as
1.245 nicm 1603: .Op Fl F Ar format
1.214 nicm 1604: .Op Fl t Ar target
1605: .Xc
1.104 nicm 1606: .D1 (alias: Ic lsp )
1.214 nicm 1607: If
1608: .Fl a
1609: is given,
1610: .Ar target
1611: is ignored and all panes on the server are listed.
1612: If
1613: .Fl s
1614: is given,
1615: .Ar target
1616: is a session (or the current session).
1617: If neither is given,
1618: .Ar target
1619: is a window (or the current window).
1.247 nicm 1620: For the meaning of the
1621: .Fl F
1622: flag, see the
1623: .Sx FORMATS
1624: section.
1.214 nicm 1625: .It Xo Ic list-windows
1626: .Op Fl a
1.245 nicm 1627: .Op Fl F Ar format
1.214 nicm 1628: .Op Fl t Ar target-session
1629: .Xc
1.1 nicm 1630: .D1 (alias: Ic lsw )
1.214 nicm 1631: If
1632: .Fl a
1633: is given, list all windows on the server.
1634: Otherwise, list windows in the current session or in
1.1 nicm 1635: .Ar target-session .
1.245 nicm 1636: For the meaning of the
1637: .Fl F
1638: flag, see the
1639: .Sx FORMATS
1640: section.
1.277 nicm 1641: .It Xo Ic move-pane
1642: .Op Fl bdhv
1643: .Oo Fl l
1644: .Ar size |
1645: .Fl p Ar percentage Oc
1646: .Op Fl s Ar src-pane
1647: .Op Fl t Ar dst-pane
1648: .Xc
1649: .D1 (alias: Ic movep )
1650: Like
1651: .Ic join-pane ,
1652: but
1653: .Ar src-pane
1654: and
1655: .Ar dst-pane
1656: may belong to the same window.
1.1 nicm 1657: .It Xo Ic move-window
1.439 nicm 1658: .Op Fl ardk
1.1 nicm 1659: .Op Fl s Ar src-window
1660: .Op Fl t Ar dst-window
1661: .Xc
1662: .D1 (alias: Ic movew )
1663: This is similar to
1664: .Ic link-window ,
1665: except the window at
1666: .Ar src-window
1667: is moved to
1668: .Ar dst-window .
1.291 nicm 1669: With
1670: .Fl r ,
1671: all windows in the session are renumbered in sequential order, respecting
1672: the
1673: .Ic base-index
1674: option.
1.1 nicm 1675: .It Xo Ic new-window
1.201 nicm 1676: .Op Fl adkP
1.272 nicm 1677: .Op Fl c Ar start-directory
1.351 nicm 1678: .Op Fl F Ar format
1.1 nicm 1679: .Op Fl n Ar window-name
1680: .Op Fl t Ar target-window
1.153 nicm 1681: .Op Ar shell-command
1.1 nicm 1682: .Xc
1683: .D1 (alias: Ic neww )
1684: Create a new window.
1.160 nicm 1685: With
1686: .Fl a ,
1687: the new window is inserted at the next index up from the specified
1688: .Ar target-window ,
1689: moving windows up if necessary,
1690: otherwise
1691: .Ar target-window
1692: is the new window location.
1693: .Pp
1.1 nicm 1694: If
1695: .Fl d
1696: is given, the session does not make the new window the current window.
1697: .Ar target-window
1.28 nicm 1698: represents the window to be created; if the target already exists an error is
1699: shown, unless the
1700: .Fl k
1701: flag is used, in which case it is destroyed.
1.153 nicm 1702: .Ar shell-command
1.1 nicm 1703: is the command to execute.
1704: If
1.153 nicm 1705: .Ar shell-command
1706: is not specified, the value of the
1707: .Ic default-command
1708: option is used.
1.272 nicm 1709: .Fl c
1710: specifies the working directory in which the new window is created.
1.153 nicm 1711: .Pp
1712: When the shell command completes, the window closes.
1713: See the
1714: .Ic remain-on-exit
1715: option to change this behaviour.
1.1 nicm 1716: .Pp
1717: The
1718: .Ev TERM
1719: environment variable must be set to
1.523 nicm 1720: .Ql screen
1721: or
1722: .Ql tmux
1.1 nicm 1723: for all programs running
1724: .Em inside
1725: .Nm .
1726: New windows will automatically have
1.523 nicm 1727: .Ql TERM=screen
1.1 nicm 1728: added to their environment, but care must be taken not to reset this in shell
1729: start-up files.
1.201 nicm 1730: .Pp
1731: The
1732: .Fl P
1.279 nicm 1733: option prints information about the new window after it has been created.
1734: By default, it uses the format
1735: .Ql #{session_name}:#{window_index}
1736: but a different format may be specified with
1737: .Fl F .
1.56 jmc 1738: .It Ic next-layout Op Fl t Ar target-window
1.1 nicm 1739: .D1 (alias: Ic nextl )
1740: Move a window to the next layout and rearrange the panes to fit.
1741: .It Xo Ic next-window
1.9 nicm 1742: .Op Fl a
1.1 nicm 1743: .Op Fl t Ar target-session
1744: .Xc
1745: .D1 (alias: Ic next )
1746: Move to the next window in the session.
1.9 nicm 1747: If
1.12 jmc 1748: .Fl a
1.295 nicm 1749: is used, move to the next window with an alert.
1.107 nicm 1750: .It Xo Ic pipe-pane
1751: .Op Fl o
1752: .Op Fl t Ar target-pane
1.153 nicm 1753: .Op Ar shell-command
1.107 nicm 1754: .Xc
1755: .D1 (alias: Ic pipep )
1756: Pipe any output sent by the program in
1757: .Ar target-pane
1758: to a shell command.
1759: A pane may only be piped to one command at a time, any existing pipe is
1760: closed before
1.153 nicm 1761: .Ar shell-command
1.107 nicm 1762: is executed.
1.174 nicm 1763: The
1764: .Ar shell-command
1765: string may contain the special character sequences supported by the
1766: .Ic status-left
1.231 nicm 1767: option.
1.107 nicm 1768: If no
1.153 nicm 1769: .Ar shell-command
1.107 nicm 1770: is given, the current pipe (if any) is closed.
1771: .Pp
1772: The
1773: .Fl o
1774: option only opens a new pipe if no previous pipe exists, allowing a pipe to
1775: be toggled with a single key, for example:
1776: .Bd -literal -offset indent
1.174 nicm 1777: bind-key C-p pipe-pane -o 'cat >>~/output.#I-#P'
1.107 nicm 1778: .Ed
1.176 nicm 1779: .It Xo Ic previous-layout
1780: .Op Fl t Ar target-window
1781: .Xc
1782: .D1 (alias: Ic prevl )
1783: Move to the previous layout in the session.
1.1 nicm 1784: .It Xo Ic previous-window
1.9 nicm 1785: .Op Fl a
1.1 nicm 1786: .Op Fl t Ar target-session
1787: .Xc
1788: .D1 (alias: Ic prev )
1789: Move to the previous window in the session.
1.9 nicm 1790: With
1791: .Fl a ,
1.295 nicm 1792: move to the previous window with an alert.
1.1 nicm 1793: .It Xo Ic rename-window
1794: .Op Fl t Ar target-window
1795: .Ar new-name
1796: .Xc
1797: .D1 (alias: Ic renamew )
1798: Rename the current window, or the window at
1799: .Ar target-window
1800: if specified, to
1801: .Ar new-name .
1802: .It Xo Ic resize-pane
1.419 nicm 1803: .Op Fl DLMRUZ
1.52 nicm 1804: .Op Fl t Ar target-pane
1.324 nicm 1805: .Op Fl x Ar width
1806: .Op Fl y Ar height
1.1 nicm 1807: .Op Ar adjustment
1808: .Xc
1809: .D1 (alias: Ic resizep )
1.324 nicm 1810: Resize a pane, up, down, left or right by
1811: .Ar adjustment
1812: with
1813: .Fl U ,
1.57 jmc 1814: .Fl D ,
1815: .Fl L
1.324 nicm 1816: or
1817: .Fl R ,
1818: or
1819: to an absolute size
1820: with
1821: .Fl x
1822: or
1823: .Fl y .
1.57 jmc 1824: The
1825: .Ar adjustment
1826: is given in lines or cells (the default is 1).
1.337 nicm 1827: .Pp
1828: With
1829: .Fl Z ,
1.349 nicm 1830: the active pane is toggled between zoomed (occupying the whole of the window)
1831: and unzoomed (its normal position in the layout).
1.419 nicm 1832: .Pp
1833: .Fl M
1834: begins mouse resizing (only valid if bound to a mouse key binding, see
1.420 jmc 1835: .Sx MOUSE SUPPORT ) .
1.234 nicm 1836: .It Xo Ic respawn-pane
1.568 nicm 1837: .Op Fl c Ar start-directory
1.234 nicm 1838: .Op Fl k
1839: .Op Fl t Ar target-pane
1840: .Op Ar shell-command
1841: .Xc
1842: .D1 (alias: Ic respawnp )
1843: Reactivate a pane in which the command has exited (see the
1844: .Ic remain-on-exit
1845: window option).
1846: If
1847: .Ar shell-command
1848: is not given, the command used when the pane was created is executed.
1849: The pane must be already inactive, unless
1850: .Fl k
1851: is given, in which case any existing command is killed.
1.568 nicm 1852: .Fl c
1853: specifies a new working directory for the pane.
1.57 jmc 1854: .It Xo Ic respawn-window
1.568 nicm 1855: .Op Fl c Ar start-directory
1.57 jmc 1856: .Op Fl k
1857: .Op Fl t Ar target-window
1.153 nicm 1858: .Op Ar shell-command
1.57 jmc 1859: .Xc
1860: .D1 (alias: Ic respawnw )
1.153 nicm 1861: Reactivate a window in which the command has exited (see the
1.57 jmc 1862: .Ic remain-on-exit
1863: window option).
1864: If
1.153 nicm 1865: .Ar shell-command
1.57 jmc 1866: is not given, the command used when the window was created is executed.
1867: The window must be already inactive, unless
1868: .Fl k
1869: is given, in which case any existing command is killed.
1.568 nicm 1870: .Fl c
1871: specifies a new working directory for the window.
1.57 jmc 1872: .It Xo Ic rotate-window
1873: .Op Fl DU
1874: .Op Fl t Ar target-window
1875: .Xc
1876: .D1 (alias: Ic rotatew )
1877: Rotate the positions of the panes within a window, either upward (numerically
1878: lower) with
1879: .Fl U
1880: or downward (numerically higher).
1881: .It Xo Ic select-layout
1.424 nicm 1882: .Op Fl nop
1.57 jmc 1883: .Op Fl t Ar target-window
1884: .Op Ar layout-name
1885: .Xc
1.176 nicm 1886: .D1 (alias: Ic selectl )
1.57 jmc 1887: Choose a specific layout for a window.
1888: If
1889: .Ar layout-name
1.181 nicm 1890: is not given, the last preset layout used (if any) is reapplied.
1.204 nicm 1891: .Fl n
1892: and
1893: .Fl p
1894: are equivalent to the
1895: .Ic next-layout
1896: and
1897: .Ic previous-layout
1898: commands.
1.424 nicm 1899: .Fl o
1900: applies the last set layout if possible (undoes the most recent layout change).
1.156 nicm 1901: .It Xo Ic select-pane
1.432 nicm 1902: .Op Fl DdegLlMmRU
1.418 nicm 1903: .Op Fl P Ar style
1.156 nicm 1904: .Op Fl t Ar target-pane
1905: .Xc
1.57 jmc 1906: .D1 (alias: Ic selectp )
1907: Make pane
1908: .Ar target-pane
1909: the active pane in window
1.418 nicm 1910: .Ar target-window ,
1.420 jmc 1911: or set its style (with
1.418 nicm 1912: .Fl P ) .
1.156 nicm 1913: If one of
1914: .Fl D ,
1915: .Fl L ,
1916: .Fl R ,
1917: or
1918: .Fl U
1919: is used, respectively the pane below, to the left, to the right, or above the
1920: target pane is used.
1.204 nicm 1921: .Fl l
1922: is the same as using the
1923: .Ic last-pane
1924: command.
1.398 nicm 1925: .Fl e
1926: enables or
1927: .Fl d
1928: disables input to the pane.
1.418 nicm 1929: .Pp
1.432 nicm 1930: .Fl m
1931: and
1932: .Fl M
1933: are used to set and clear the
1934: .Em marked pane .
1935: There is one marked pane at a time, setting a new marked pane clears the last.
1936: The marked pane is the default target for
1937: .Fl s
1938: to
1939: .Ic join-pane ,
1940: .Ic swap-pane
1941: and
1942: .Ic swap-window .
1943: .Pp
1.418 nicm 1944: Each pane has a style: by default the
1945: .Ic window-style
1946: and
1947: .Ic window-active-style
1948: options are used,
1949: .Ic select-pane
1950: .Fl P
1951: sets the style for a single pane.
1952: For example, to set the pane 1 background to red:
1953: .Bd -literal -offset indent
1954: select-pane -t:.1 -P 'bg=red'
1955: .Ed
1956: .Pp
1957: .Fl g
1958: shows the current pane style.
1.204 nicm 1959: .It Xo Ic select-window
1.310 nicm 1960: .Op Fl lnpT
1.204 nicm 1961: .Op Fl t Ar target-window
1962: .Xc
1.57 jmc 1963: .D1 (alias: Ic selectw )
1964: Select the window at
1965: .Ar target-window .
1.204 nicm 1966: .Fl l ,
1967: .Fl n
1968: and
1969: .Fl p
1970: are equivalent to the
1971: .Ic last-window ,
1972: .Ic next-window
1973: and
1974: .Ic previous-window
1975: commands.
1.310 nicm 1976: If
1977: .Fl T
1978: is given and the selected window is already the current window,
1979: the command behaves like
1980: .Ic last-window .
1.57 jmc 1981: .It Xo Ic split-window
1.502 nicm 1982: .Op Fl bdfhvP
1.272 nicm 1983: .Op Fl c Ar start-directory
1.57 jmc 1984: .Oo Fl l
1985: .Ar size |
1986: .Fl p Ar percentage Oc
1.136 nicm 1987: .Op Fl t Ar target-pane
1.153 nicm 1988: .Op Ar shell-command
1.279 nicm 1989: .Op Fl F Ar format
1.57 jmc 1990: .Xc
1.176 nicm 1991: .D1 (alias: Ic splitw )
1.136 nicm 1992: Create a new pane by splitting
1993: .Ar target-pane :
1.57 jmc 1994: .Fl h
1995: does a horizontal split and
1996: .Fl v
1997: a vertical split; if neither is specified,
1998: .Fl v
1999: is assumed.
2000: The
2001: .Fl l
2002: and
2003: .Fl p
1.136 nicm 2004: options specify the size of the new pane in lines (for vertical split) or in
1.57 jmc 2005: cells (for horizontal split), or as a percentage, respectively.
1.408 nicm 2006: The
2007: .Fl b
2008: option causes the new pane to be created to the left of or above
2009: .Ar target-pane .
1.494 nicm 2010: The
2011: .Fl f
2012: option creates a new pane spanning the full window height (with
2013: .Fl h )
2014: or full window width (with
2015: .Fl v ) ,
2016: instead of splitting the active pane.
1.136 nicm 2017: All other options have the same meaning as for the
1.57 jmc 2018: .Ic new-window
2019: command.
2020: .It Xo Ic swap-pane
2021: .Op Fl dDU
2022: .Op Fl s Ar src-pane
2023: .Op Fl t Ar dst-pane
2024: .Xc
2025: .D1 (alias: Ic swapp )
2026: Swap two panes.
2027: If
2028: .Fl U
2029: is used and no source pane is specified with
2030: .Fl s ,
2031: .Ar dst-pane
2032: is swapped with the previous pane (before it numerically);
2033: .Fl D
2034: swaps with the next pane (after it numerically).
1.138 nicm 2035: .Fl d
2036: instructs
2037: .Nm
2038: not to change the active pane.
1.432 nicm 2039: .Pp
2040: If
2041: .Fl s
2042: is omitted and a marked pane is present (see
2043: .Ic select-pane
2044: .Fl m ) ,
2045: the marked pane is used rather than the current pane.
1.57 jmc 2046: .It Xo Ic swap-window
2047: .Op Fl d
2048: .Op Fl s Ar src-window
2049: .Op Fl t Ar dst-window
2050: .Xc
2051: .D1 (alias: Ic swapw )
2052: This is similar to
2053: .Ic link-window ,
2054: except the source and destination windows are swapped.
2055: It is an error if no window exists at
2056: .Ar src-window .
1.432 nicm 2057: .Pp
2058: Like
2059: .Ic swap-pane ,
2060: if
2061: .Fl s
2062: is omitted and a marked pane is present (see
2063: .Ic select-pane
2064: .Fl m ) ,
2065: the window containing the marked pane is used rather than the current window.
1.57 jmc 2066: .It Xo Ic unlink-window
1.1 nicm 2067: .Op Fl k
2068: .Op Fl t Ar target-window
2069: .Xc
1.57 jmc 2070: .D1 (alias: Ic unlinkw )
2071: Unlink
2072: .Ar target-window .
2073: Unless
2074: .Fl k
2075: is given, a window may be unlinked only if it is linked to multiple sessions -
2076: windows may not be linked to no sessions;
2077: if
1.1 nicm 2078: .Fl k
1.57 jmc 2079: is specified and the window is linked to only one session, it is unlinked and
2080: destroyed.
2081: .El
2082: .Sh KEY BINDINGS
1.93 nicm 2083: .Nm
2084: allows a command to be bound to most keys, with or without a prefix key.
2085: When specifying keys, most represent themselves (for example
2086: .Ql A
2087: to
1.95 jmc 2088: .Ql Z ) .
1.93 nicm 2089: Ctrl keys may be prefixed with
2090: .Ql C-
2091: or
1.95 jmc 2092: .Ql ^ ,
2093: and Alt (meta) with
1.93 nicm 2094: .Ql M- .
2095: In addition, the following special key names are accepted:
1.126 nicm 2096: .Em Up ,
2097: .Em Down ,
2098: .Em Left ,
2099: .Em Right ,
1.93 nicm 2100: .Em BSpace ,
2101: .Em BTab ,
2102: .Em DC
2103: (Delete),
2104: .Em End ,
2105: .Em Enter ,
2106: .Em Escape ,
2107: .Em F1
2108: to
1.402 nicm 2109: .Em F12 ,
1.93 nicm 2110: .Em Home ,
2111: .Em IC
2112: (Insert),
1.254 nicm 2113: .Em NPage/PageDown/PgDn ,
2114: .Em PPage/PageUp/PgUp ,
1.93 nicm 2115: .Em Space ,
2116: and
2117: .Em Tab .
2118: Note that to bind the
2119: .Ql \&"
2120: or
2121: .Ql '
2122: keys, quotation marks are necessary, for example:
2123: .Bd -literal -offset indent
2124: bind-key '"' split-window
1.167 nicm 2125: bind-key "'" new-window
1.93 nicm 2126: .Ed
2127: .Pp
1.57 jmc 2128: Commands related to key bindings are as follows:
2129: .Bl -tag -width Ds
2130: .It Xo Ic bind-key
1.501 nicm 2131: .Op Fl nr
1.421 nicm 2132: .Op Fl T Ar key-table
1.57 jmc 2133: .Ar key Ar command Op Ar arguments
1.1 nicm 2134: .Xc
1.57 jmc 2135: .D1 (alias: Ic bind )
2136: Bind key
2137: .Ar key
2138: to
2139: .Ar command .
1.421 nicm 2140: Keys are bound in a key table.
2141: By default (without -T), the key is bound in
2142: the
2143: .Em prefix
2144: key table.
2145: This table is used for keys pressed after the prefix key (for example,
2146: by default
2147: .Ql c
2148: is bound to
2149: .Ic new-window
2150: in the
2151: .Em prefix
2152: table, so
2153: .Ql C-b c
2154: creates a new window).
2155: The
2156: .Em root
2157: table is used for keys pressed without the prefix key: binding
2158: .Ql c
2159: to
2160: .Ic new-window
2161: in the
2162: .Em root
2163: table (not recommended) means a plain
2164: .Ql c
2165: will create a new window.
1.57 jmc 2166: .Fl n
1.421 nicm 2167: is an alias
2168: for
2169: .Fl T Ar root .
2170: Keys may also be bound in custom key tables and the
2171: .Ic switch-client
2172: .Fl T
2173: command used to switch to them from a key binding.
1.1 nicm 2174: The
1.57 jmc 2175: .Fl r
2176: flag indicates this key may repeat, see the
2177: .Ic repeat-time
2178: option.
2179: .Pp
2180: To view the default bindings and possible commands, see the
2181: .Ic list-keys
2182: command.
1.421 nicm 2183: .It Xo Ic list-keys
2184: .Op Fl T Ar key-table
2185: .Xc
1.57 jmc 2186: .D1 (alias: Ic lsk )
2187: List all key bindings.
2188: Without
1.421 nicm 2189: .Fl T
2190: all key tables are printed.
2191: With
2192: .Fl T
2193: only
2194: .Ar key-table .
1.57 jmc 2195: .It Xo Ic send-keys
1.497 nicm 2196: .Op Fl lMRX
2197: .Op Fl N Ar repeat-count
1.72 nicm 2198: .Op Fl t Ar target-pane
1.57 jmc 2199: .Ar key Ar ...
1.1 nicm 2200: .Xc
1.57 jmc 2201: .D1 (alias: Ic send )
2202: Send a key or keys to a window.
2203: Each argument
2204: .Ar key
2205: is the name of the key (such as
2206: .Ql C-a
2207: or
1.523 nicm 2208: .Ql NPage )
2209: to send; if the string is not recognised as a key, it is sent as a series of
1.57 jmc 2210: characters.
1.273 nicm 2211: The
2212: .Fl l
2213: flag disables key name lookup and sends the keys literally.
1.57 jmc 2214: All arguments are sent sequentially from first to last.
1.265 nicm 2215: The
2216: .Fl R
2217: flag causes the terminal state to be reset.
1.419 nicm 2218: .Pp
2219: .Fl M
2220: passes through a mouse event (only valid if bound to a mouse key binding, see
1.420 jmc 2221: .Sx MOUSE SUPPORT ) .
1.497 nicm 2222: .Pp
2223: .Fl X
2224: is used to send a command into copy mode - see
2225: the
2226: .Sx WINDOWS AND PANES
2227: section.
2228: .Fl N
1.516 nicm 2229: specifies a repeat count.
1.267 nicm 2230: .It Xo Ic send-prefix
2231: .Op Fl 2
2232: .Op Fl t Ar target-pane
2233: .Xc
2234: Send the prefix key, or with
2235: .Fl 2
2236: the secondary prefix key, to a window as if it was pressed.
1.57 jmc 2237: .It Xo Ic unbind-key
1.501 nicm 2238: .Op Fl an
1.421 nicm 2239: .Op Fl T Ar key-table
1.57 jmc 2240: .Ar key
1.2 nicm 2241: .Xc
1.57 jmc 2242: .D1 (alias: Ic unbind )
2243: Unbind the command bound to
2244: .Ar key .
1.530 nicm 2245: .Fl n
2246: and
1.421 nicm 2247: .Fl T
2248: are the same as for
2249: .Ic bind-key .
1.189 nicm 2250: If
2251: .Fl a
2252: is present, all key bindings are removed.
1.57 jmc 2253: .El
2254: .Sh OPTIONS
2255: The appearance and behaviour of
2256: .Nm
2257: may be modified by changing the value of various options.
1.133 nicm 2258: There are three types of option:
2259: .Em server options ,
1.57 jmc 2260: .Em session options
2261: and
2262: .Em window options .
2263: .Pp
1.133 nicm 2264: The
2265: .Nm
2266: server has a set of global options which do not apply to any particular
2267: window or session.
2268: These are altered with the
2269: .Ic set-option
2270: .Fl s
2271: command, or displayed with the
2272: .Ic show-options
2273: .Fl s
2274: command.
2275: .Pp
2276: In addition, each individual session may have a set of session options, and
2277: there is a separate set of global session options.
1.57 jmc 2278: Sessions which do not have a particular option configured inherit the value
2279: from the global session options.
2280: Session options are set or unset with the
2281: .Ic set-option
2282: command and may be listed with the
2283: .Ic show-options
2284: command.
1.133 nicm 2285: The available server and session options are listed under the
1.57 jmc 2286: .Ic set-option
2287: command.
2288: .Pp
2289: Similarly, a set of window options is attached to each window, and there is
2290: a set of global window options from which any unset options are inherited.
2291: Window options are altered with the
2292: .Ic set-window-option
2293: command and can be listed with the
2294: .Ic show-window-options
2295: command.
2296: All window options are documented with the
2297: .Ic set-window-option
2298: command.
1.318 nicm 2299: .Pp
2300: .Nm
2301: also supports user options which are prefixed with a
2302: .Ql \&@ .
1.321 jmc 2303: User options may have any name, so long as they are prefixed with
2304: .Ql \&@ ,
1.318 nicm 2305: and be set to any string.
1.418 nicm 2306: For example:
1.318 nicm 2307: .Bd -literal -offset indent
2308: $ tmux setw -q @foo "abc123"
2309: $ tmux showw -v @foo
2310: abc123
2311: .Ed
1.57 jmc 2312: .Pp
2313: Commands which set options are as follows:
2314: .Bl -tag -width Ds
1.1 nicm 2315: .It Xo Ic set-option
1.550 nicm 2316: .Op Fl aFgoqsuw
1.129 nicm 2317: .Op Fl t Ar target-session | Ar target-window
1.1 nicm 2318: .Ar option Ar value
2319: .Xc
2320: .D1 (alias: Ic set )
1.133 nicm 2321: Set a window option with
2322: .Fl w
2323: (equivalent to the
2324: .Ic set-window-option
2325: command),
2326: a server option with
2327: .Fl s ,
2328: otherwise a session option.
2329: If
2330: .Fl g
1.433 nicm 2331: is given, the global session or window option is set.
1.550 nicm 2332: .Fl F
2333: expands formats in the option value.
1.1 nicm 2334: The
2335: .Fl u
2336: flag unsets an option, so a session inherits the option from the global
1.433 nicm 2337: options (or with
2338: .Fl g ,
2339: restores a global option to the default).
1.336 nicm 2340: .Pp
2341: The
2342: .Fl o
1.446 nicm 2343: flag prevents setting an option that is already set and the
1.281 nicm 2344: .Fl q
1.446 nicm 2345: flag suppresses errors about unknown or ambiguous options.
1.281 nicm 2346: .Pp
1.378 nicm 2347: With
2348: .Fl a ,
2349: and if the option expects a string or a style,
2350: .Ar value
2351: is appended to the existing setting.
2352: For example:
2353: .Bd -literal -offset indent
2354: set -g status-left "foo"
2355: set -ag status-left "bar"
2356: .Ed
2357: .Pp
2358: Will result in
2359: .Ql foobar .
2360: And:
2361: .Bd -literal -offset indent
2362: set -g status-style "bg=red"
2363: set -ag status-style "fg=blue"
2364: .Ed
2365: .Pp
2366: Will result in a red background
2367: .Em and
2368: blue foreground.
2369: Without
2370: .Fl a ,
2371: the result would be the default background and a blue foreground.
2372: .Pp
1.133 nicm 2373: Available window options are listed under
2374: .Ic set-window-option .
1.274 nicm 2375: .Pp
2376: .Ar value
2377: depends on the option and may be a number, a string, or a flag (on, off, or
2378: omitted to toggle).
1.133 nicm 2379: .Pp
2380: Available server options are:
2381: .Bl -tag -width Ds
1.198 nicm 2382: .It Ic buffer-limit Ar number
2383: Set the number of buffers; as new buffers are added to the top of the stack,
2384: old ones are removed from the bottom if necessary to maintain this maximum
2385: length.
1.526 nicm 2386: .It Xo Ic command-alias[]
2387: .Ar name=value
2388: .Xc
2389: This is an array of custom aliases for commands.
2390: If an unknown command matches
2391: .Ar name ,
2392: it is replaced with
2393: .Ar value .
2394: For example, after:
2395: .Pp
1.565 nicm 2396: .Dl set -s command-alias[100] zoom='resize-pane -Z'
1.526 nicm 2397: .Pp
2398: Using:
2399: .Pp
2400: .Dl zoom -t:.1
2401: .Pp
2402: Is equivalent to:
2403: .Pp
2404: .Dl resize-pane -Z -t:.1
2405: .Pp
2406: Note that aliases are expanded when a command is parsed rather than when it is
2407: executed, so binding an alias with
2408: .Ic bind-key
2409: will bind the expanded form.
1.425 nicm 2410: .It Ic default-terminal Ar terminal
2411: Set the default terminal for new windows created in this session - the
2412: default value of the
2413: .Ev TERM
2414: environment variable.
2415: For
2416: .Nm
2417: to work correctly, this
2418: .Em must
2419: be set to
2420: .Ql screen ,
2421: .Ql tmux
2422: or a derivative of them.
1.239 nicm 2423: .It Ic escape-time Ar time
2424: Set the time in milliseconds for which
2425: .Nm
2426: waits after an escape is input to determine if it is part of a function or meta
2427: key sequences.
2428: The default is 500 milliseconds.
2429: .It Xo Ic exit-unattached
2430: .Op Ic on | off
2431: .Xc
2432: If enabled, the server will exit when there are no attached clients.
1.362 nicm 2433: .It Xo Ic focus-events
2434: .Op Ic on | off
2435: .Xc
2436: When enabled, focus events are requested from the terminal if supported and
2437: passed through to applications running in
2438: .Nm .
2439: Attached clients should be detached and attached again after changing this
2440: option.
1.445 nicm 2441: .It Ic history-file Ar path
2442: If not empty, a file to which
2443: .Nm
2444: will write command prompt history on exit and load it from on start.
1.384 nicm 2445: .It Ic message-limit Ar number
2446: Set the number of error or information messages to save in the message log for
2447: each client.
2448: The default is 100.
1.228 nicm 2449: .It Xo Ic set-clipboard
1.556 nicm 2450: .Op Ic on | external | off
1.228 nicm 2451: .Xc
2452: Attempt to set the terminal clipboard content using the
2453: .Xr xterm 1
1.560 nicm 2454: escape sequence, if there is an
1.228 nicm 2455: .Em \&Ms
2456: entry in the
2457: .Xr terminfo 5
1.560 nicm 2458: description (see the
2459: .Sx TERMINFO EXTENSIONS
2460: section).
2461: .Pp
1.556 nicm 2462: If set to
2463: .Ic on ,
2464: .Nm
2465: will both accept the escape sequence to create a buffer and attempt to set
2466: the terminal clipboard.
2467: If set to
2468: .Ic external ,
2469: .Nm
2470: will attempt to set the terminal clipboard but ignore attempts
2471: by applications to set
2472: .Nm
2473: buffers.
2474: If
2475: .Ic off ,
2476: .Nm
2477: will neither accept the clipboard escape sequence nor attempt to set the
2478: clipboard.
2479: .Pp
1.228 nicm 2480: Note that this feature needs to be enabled in
2481: .Xr xterm 1
2482: by setting the resource:
2483: .Bd -literal -offset indent
2484: disallowedWindowOps: 20,21,SetXprop
2485: .Ed
2486: .Pp
2487: Or changing this property from the
2488: .Xr xterm 1
2489: interactive menu when required.
1.528 nicm 2490: .It Ic terminal-overrides[] Ar string
2491: Allow terminal descriptions read using
2492: .Xr terminfo 5
1.531 nicm 2493: to be overridden.
1.528 nicm 2494: Each entry is a colon-separated string made up of a terminal type pattern
2495: (matched using
1.381 nicm 2496: .Xr fnmatch 3 )
2497: and a set of
2498: .Em name=value
2499: entries.
2500: .Pp
2501: For example, to set the
2502: .Ql clear
2503: .Xr terminfo 5
2504: entry to
2505: .Ql \ee[H\ee[2J
1.528 nicm 2506: for all terminal types matching
2507: .Ql rxvt* :
2508: .Pp
2509: .Dl "rxvt*:clear=\ee[H\ee[2J"
1.381 nicm 2510: .Pp
2511: The terminal entry value is passed through
2512: .Xr strunvis 3
2513: before interpretation.
1.133 nicm 2514: .El
1.129 nicm 2515: .Pp
1.18 nicm 2516: Available session options are:
1.1 nicm 2517: .Bl -tag -width Ds
1.569 ! nicm 2518: .It Xo Ic activity-action
! 2519: .Op Ic any | none | current | other
! 2520: .Xc
! 2521: Set action on window activity when
! 2522: .Ic monitor-activity
! 2523: is on.
! 2524: .Ic any
! 2525: means activity in any window linked to a session causes a bell or message
! 2526: (depending on
! 2527: .Ic visual-activity )
! 2528: in the current window of that session,
! 2529: .Ic none
! 2530: means all activity is ignored (equivalent to
! 2531: .Ic monitor-activity
! 2532: being off),
! 2533: .Ic current
! 2534: means only activity in windows other than the current window are ignored and
! 2535: .Ic other
! 2536: means activity in the current window is ignored but not those in other windows.
1.312 nicm 2537: .It Ic assume-paste-time Ar milliseconds
2538: If keys are entered faster than one in
2539: .Ar milliseconds ,
2540: they are assumed to have been pasted rather than typed and
2541: .Nm
2542: key bindings are not processed.
2543: The default is one millisecond and zero disables.
1.69 nicm 2544: .It Ic base-index Ar index
2545: Set the base index from which an unused index should be searched when a new
2546: window is created.
2547: The default is zero.
1.1 nicm 2548: .It Xo Ic bell-action
1.429 nicm 2549: .Op Ic any | none | current | other
1.1 nicm 2550: .Xc
2551: Set action on window bell.
1.569 ! nicm 2552: The values are the same as those for
! 2553: .Ic activity-action .
1.153 nicm 2554: .It Ic default-command Ar shell-command
1.1 nicm 2555: Set the command used for new windows (if not specified when the window is
2556: created) to
1.153 nicm 2557: .Ar shell-command ,
1.79 nicm 2558: which may be any
2559: .Xr sh 1
2560: command.
1.19 nicm 2561: The default is an empty string, which instructs
2562: .Nm
1.79 nicm 2563: to create a login shell using the value of the
2564: .Ic default-shell
2565: option.
2566: .It Ic default-shell Ar path
2567: Specify the default shell.
2568: This is used as the login shell for new windows when the
2569: .Ic default-command
2570: option is set to empty, and must be the full path of the executable.
2571: When started
2572: .Nm
2573: tries to set a default value from the first suitable of the
1.19 nicm 2574: .Ev SHELL
1.79 nicm 2575: environment variable, the shell returned by
2576: .Xr getpwuid 3 ,
2577: or
2578: .Pa /bin/sh .
2579: This option should be configured when
2580: .Nm
2581: is used as a login shell.
1.206 nicm 2582: .It Xo Ic destroy-unattached
2583: .Op Ic on | off
2584: .Xc
1.185 nicm 2585: If enabled and the session is no longer attached to any clients, it is
2586: destroyed.
1.206 nicm 2587: .It Xo Ic detach-on-destroy
2588: .Op Ic on | off
2589: .Xc
1.184 nicm 2590: If on (the default), the client is detached when the session it is attached to
2591: is destroyed.
2592: If off, the client is switched to the most recently active of the remaining
2593: sessions.
1.145 nicm 2594: .It Ic display-panes-active-colour Ar colour
2595: Set the colour used by the
2596: .Ic display-panes
2597: command to show the indicator for the active pane.
1.78 nicm 2598: .It Ic display-panes-colour Ar colour
1.145 nicm 2599: Set the colour used by the
1.78 nicm 2600: .Ic display-panes
1.145 nicm 2601: command to show the indicators for inactive panes.
1.78 nicm 2602: .It Ic display-panes-time Ar time
2603: Set the time in milliseconds for which the indicators shown by the
2604: .Ic display-panes
2605: command appear.
1.21 nicm 2606: .It Ic display-time Ar time
1.78 nicm 2607: Set the amount of time for which status line messages and other on-screen
2608: indicators are displayed.
1.462 tim 2609: If set to 0, messages and indicators are displayed until a key is pressed.
1.21 nicm 2610: .Ar time
2611: is in milliseconds.
1.1 nicm 2612: .It Ic history-limit Ar lines
2613: Set the maximum number of lines held in window history.
2614: This setting applies only to new windows - existing window histories are not
2615: resized and retain the limit at the point they were created.
1.474 nicm 2616: .It Ic key-table Ar key-table
2617: Set the default key table to
2618: .Ar key-table
2619: instead of
2620: .Em root .
1.1 nicm 2621: .It Ic lock-after-time Ar number
1.100 nicm 2622: Lock the session (like the
2623: .Ic lock-session
1.90 nicm 2624: command) after
1.1 nicm 2625: .Ar number
1.448 nicm 2626: seconds of inactivity.
1.100 nicm 2627: The default is not to lock (set to 0).
1.153 nicm 2628: .It Ic lock-command Ar shell-command
1.90 nicm 2629: Command to run when locking each client.
2630: The default is to run
2631: .Xr lock 1
2632: with
2633: .Fl np .
1.378 nicm 2634: .It Ic message-command-style Ar style
2635: Set status line message command style, where
2636: .Ar style
2637: is a comma-separated list of characteristics to be specified.
2638: .Pp
2639: These may be
2640: .Ql bg=colour
2641: to set the background colour,
2642: .Ql fg=colour
2643: to set the foreground colour, and a list of attributes as specified below.
2644: .Pp
2645: The colour is one of:
1.1 nicm 2646: .Ic black ,
2647: .Ic red ,
2648: .Ic green ,
2649: .Ic yellow ,
2650: .Ic blue ,
2651: .Ic magenta ,
2652: .Ic cyan ,
1.85 nicm 2653: .Ic white ,
1.266 nicm 2654: aixterm bright variants (if supported:
2655: .Ic brightred ,
2656: .Ic brightgreen ,
2657: and so on),
1.85 nicm 2658: .Ic colour0
2659: to
2660: .Ic colour255
1.205 nicm 2661: from the 256-colour set,
2662: .Ic default ,
2663: or a hexadecimal RGB string such as
2664: .Ql #ffffff ,
2665: which chooses the closest match from the default 256-colour set.
1.378 nicm 2666: .Pp
2667: The attributes is either
2668: .Ic none
2669: or a comma-delimited list of one or more of:
2670: .Ic bright
2671: (or
2672: .Ic bold ) ,
2673: .Ic dim ,
2674: .Ic underscore ,
2675: .Ic blink ,
2676: .Ic reverse ,
2677: .Ic hidden ,
1.539 nicm 2678: .Ic italics ,
1.378 nicm 2679: or
1.539 nicm 2680: .Ic strikethrough
1.378 nicm 2681: to turn an attribute on, or an attribute prefixed with
2682: .Ql no
2683: to turn one off.
2684: .Pp
2685: Examples are:
2686: .Bd -literal -offset indent
2687: fg=yellow,bold,underscore,blink
2688: bg=black,fg=default,noreverse
2689: .Ed
2690: .Pp
2691: With the
2692: .Fl a
2693: flag to the
2694: .Ic set-option
2695: command the new style is added otherwise the existing style is replaced.
2696: .It Ic message-style Ar style
2697: Set status line message style.
2698: For how to specify
2699: .Ar style ,
2700: see the
2701: .Ic message-command-style
2702: option.
1.419 nicm 2703: .It Xo Ic mouse
1.226 nicm 2704: .Op Ic on | off
2705: .Xc
2706: If on,
2707: .Nm
1.419 nicm 2708: captures the mouse and allows mouse events to be bound as key bindings.
2709: See the
2710: .Sx MOUSE SUPPORT
2711: section for details.
1.267 nicm 2712: .It Ic prefix Ar key
2713: Set the key accepted as a prefix key.
1.473 nicm 2714: In addition to the standard keys described under
2715: .Sx KEY BINDINGS ,
2716: .Ic prefix
2717: can be set to the special key
2718: .Ql None
2719: to set no prefix.
1.267 nicm 2720: .It Ic prefix2 Ar key
2721: Set a secondary key accepted as a prefix key.
1.473 nicm 2722: Like
2723: .Ic prefix ,
2724: .Ic prefix2
2725: can be set to
2726: .Ql None .
1.291 nicm 2727: .It Xo Ic renumber-windows
2728: .Op Ic on | off
2729: .Xc
2730: If on, when a window is closed in a session, automatically renumber the other
2731: windows in numerical order.
2732: This respects the
2733: .Ic base-index
2734: option if it has been set.
2735: If off, do not renumber the windows.
1.21 nicm 2736: .It Ic repeat-time Ar time
1.1 nicm 2737: Allow multiple commands to be entered without pressing the prefix-key again
2738: in the specified
1.21 nicm 2739: .Ar time
1.1 nicm 2740: milliseconds (the default is 500).
2741: Whether a key repeats may be set when it is bound using the
2742: .Fl r
2743: flag to
2744: .Ic bind-key .
1.52 nicm 2745: Repeat is enabled for the default keys bound to the
2746: .Ic resize-pane
2747: command.
1.1 nicm 2748: .It Xo Ic set-titles
1.56 jmc 2749: .Op Ic on | off
1.1 nicm 2750: .Xc
1.261 nicm 2751: Attempt to set the client terminal title using the
2752: .Em tsl
2753: and
2754: .Em fsl
2755: .Xr terminfo 5
2756: entries if they exist.
2757: .Nm
1.444 nicm 2758: automatically sets these to the \ee]0;...\e007 sequence if
2759: the terminal appears to be
2760: .Xr xterm 1 .
1.11 nicm 2761: This option is off by default.
1.86 nicm 2762: .It Ic set-titles-string Ar string
2763: String used to set the window title if
2764: .Ic set-titles
2765: is on.
1.414 nicm 2766: Formats are expanded, see the
2767: .Sx FORMATS
2768: section.
1.569 ! nicm 2769: .It Xo Ic silence-action
! 2770: .Op Ic any | none | current | other
! 2771: .Xc
! 2772: Set action on window silence when
! 2773: .Ic monitor-silence
! 2774: is on.
! 2775: The values are the same as those for
! 2776: .Ic activity-action .
! 2777: .Pp
1.1 nicm 2778: .It Xo Ic status
1.56 jmc 2779: .Op Ic on | off
1.1 nicm 2780: .Xc
2781: Show or hide the status line.
2782: .It Ic status-interval Ar interval
1.538 nicm 2783: Update the status line every
1.1 nicm 2784: .Ar interval
2785: seconds.
2786: By default, updates will occur every 15 seconds.
2787: A setting of zero disables redrawing at interval.
1.41 nicm 2788: .It Xo Ic status-justify
1.56 jmc 2789: .Op Ic left | centre | right
1.41 nicm 2790: .Xc
2791: Set the position of the window list component of the status line: left, centre
2792: or right justified.
1.1 nicm 2793: .It Xo Ic status-keys
1.56 jmc 2794: .Op Ic vi | emacs
1.1 nicm 2795: .Xc
1.6 jmc 2796: Use vi or emacs-style
1.1 nicm 2797: key bindings in the status line, for example at the command prompt.
1.191 nicm 2798: The default is emacs, unless the
2799: .Ev VISUAL
2800: or
2801: .Ev EDITOR
2802: environment variables are set and contain the string
2803: .Ql vi .
1.1 nicm 2804: .It Ic status-left Ar string
2805: Display
2806: .Ar string
1.538 nicm 2807: (by default the session name) to the left of the status line.
1.1 nicm 2808: .Ar string
2809: will be passed through
2810: .Xr strftime 3
1.359 nicm 2811: and formats (see
1.379 jmc 2812: .Sx FORMATS )
1.359 nicm 2813: will be expanded.
1.486 jmc 2814: It may also contain the special character sequence #[] to change the colour
1.485 nicm 2815: or attributes, for example
2816: .Ql #[fg=red,bright]
2817: to set a bright red foreground.
2818: See the
2819: .Ic message-command-style
2820: option for a description of colours and attributes.
1.83 nicm 2821: .Pp
1.263 nicm 2822: For details on how the names and titles can be set see the
1.261 nicm 2823: .Sx "NAMES AND TITLES"
2824: section.
1.109 nicm 2825: .Pp
1.83 nicm 2826: Examples are:
2827: .Bd -literal -offset indent
2828: #(sysctl vm.loadavg)
2829: #[fg=yellow,bold]#(apm -l)%%#[default] [#S]
2830: .Ed
1.10 nicm 2831: .Pp
1.405 nicm 2832: The default is
2833: .Ql "[#S] " .
1.1 nicm 2834: .It Ic status-left-length Ar length
2835: Set the maximum
2836: .Ar length
1.538 nicm 2837: of the left component of the status line.
1.1 nicm 2838: The default is 10.
1.378 nicm 2839: .It Ic status-left-style Ar style
2840: Set the style of the left part of the status line.
2841: For how to specify
2842: .Ar style ,
2843: see the
2844: .Ic message-command-style
2845: option.
1.269 nicm 2846: .It Xo Ic status-position
2847: .Op Ic top | bottom
2848: .Xc
2849: Set the position of the status line.
1.1 nicm 2850: .It Ic status-right Ar string
2851: Display
2852: .Ar string
1.538 nicm 2853: to the right of the status line.
1.151 nicm 2854: By default, the current window title in double quotes, the date and the time
2855: are shown.
1.1 nicm 2856: As with
2857: .Ic status-left ,
2858: .Ar string
2859: will be passed to
1.459 jmc 2860: .Xr strftime 3
2861: and character pairs are replaced.
1.1 nicm 2862: .It Ic status-right-length Ar length
2863: Set the maximum
2864: .Ar length
1.538 nicm 2865: of the right component of the status line.
1.1 nicm 2866: The default is 40.
1.378 nicm 2867: .It Ic status-right-style Ar style
2868: Set the style of the right part of the status line.
2869: For how to specify
2870: .Ar style ,
2871: see the
2872: .Ic message-command-style
2873: option.
2874: .It Ic status-style Ar style
2875: Set status line style.
2876: For how to specify
2877: .Ar style ,
2878: see the
2879: .Ic message-command-style
2880: option.
1.529 nicm 2881: .It Ic update-environment[] Ar variable
2882: Set list of environment variables to be copied into the session environment
2883: when a new session is created or an existing session is attached.
1.63 nicm 2884: Any variables that do not exist in the source environment are set to be
2885: removed from the session environment (as if
2886: .Fl r
2887: was given to the
2888: .Ic set-environment
2889: command).
1.563 nicm 2890: .It Ic user-keys[] Ar key
2891: Set list of user-defined key escape sequences.
2892: Each item is associated with a key named
1.564 nicm 2893: .Ql User0 ,
2894: .Ql User1 ,
1.563 nicm 2895: and so on.
2896: .Pp
2897: For example:
2898: .Bd -literal -offset indent
2899: set -s user-keys[0] '\e[5;30012~'
2900: bind User0 resize-pane -L 3
2901: .Ed
1.37 nicm 2902: .It Xo Ic visual-activity
1.569 ! nicm 2903: .Op Ic on | off | both
1.37 nicm 2904: .Xc
1.569 ! nicm 2905: If on, display a message instead of sending a bell when activity occurs in a
! 2906: window for which the
1.37 nicm 2907: .Ic monitor-activity
2908: window option is enabled.
1.569 ! nicm 2909: If set to both, a bell and a message are produced.
1.37 nicm 2910: .It Xo Ic visual-bell
1.569 ! nicm 2911: .Op Ic on | off | both
1.37 nicm 2912: .Xc
1.569 ! nicm 2913: If on, a message is shown on a bell instead of it being passed through to the
! 2914: terminal (which normally makes a sound).
! 2915: If set to both, a bell and a message are produced.
1.37 nicm 2916: Also see the
2917: .Ic bell-action
2918: option.
1.192 nicm 2919: .It Xo Ic visual-silence
1.569 ! nicm 2920: .Op Ic on | off | both
1.192 nicm 2921: .Xc
2922: If
2923: .Ic monitor-silence
1.569 ! nicm 2924: is enabled, prints a message after the interval has expired on a given window
! 2925: instead of sending a bell.
! 2926: If set to both, a bell and a message are produced.
1.255 nicm 2927: .It Ic word-separators Ar string
2928: Sets the session's conception of what characters are considered word
2929: separators, for the purposes of the next and previous word commands in
2930: copy mode.
2931: The default is
2932: .Ql \ -_@ .
1.1 nicm 2933: .El
2934: .It Xo Ic set-window-option
1.550 nicm 2935: .Op Fl aFgoqu
1.1 nicm 2936: .Op Fl t Ar target-window
2937: .Ar option Ar value
2938: .Xc
2939: .D1 (alias: Ic setw )
1.18 nicm 2940: Set a window option.
1.1 nicm 2941: The
1.58 nicm 2942: .Fl a ,
1.550 nicm 2943: .Fl F ,
1.281 nicm 2944: .Fl g ,
1.356 nicm 2945: .Fl o ,
1.281 nicm 2946: .Fl q
1.1 nicm 2947: and
2948: .Fl u
2949: flags work similarly to the
2950: .Ic set-option
2951: command.
2952: .Pp
1.18 nicm 2953: Supported window options are:
1.56 jmc 2954: .Pp
2955: .Bl -tag -width Ds -compact
1.1 nicm 2956: .It Xo Ic aggressive-resize
1.56 jmc 2957: .Op Ic on | off
1.1 nicm 2958: .Xc
2959: Aggressively resize the chosen window.
2960: This means that
2961: .Nm
2962: will resize the window to the size of the smallest session for which it is the
2963: current window, rather than the smallest session to which it is attached.
2964: The window may resize when the current window is changed on another sessions;
1.6 jmc 2965: this option is good for full-screen programs which support
2966: .Dv SIGWINCH
2967: and poor for interactive programs such as shells.
1.262 nicm 2968: .Pp
2969: .It Xo Ic allow-rename
2970: .Op Ic on | off
2971: .Xc
2972: Allow programs to change the window name using a terminal escape
1.478 nicm 2973: sequence (\eek...\ee\e\e).
1.262 nicm 2974: The default is on.
1.56 jmc 2975: .Pp
1.196 nicm 2976: .It Xo Ic alternate-screen
2977: .Op Ic on | off
2978: .Xc
2979: This option configures whether programs running inside
2980: .Nm
2981: may use the terminal alternate screen feature, which allows the
2982: .Em smcup
2983: and
2984: .Em rmcup
2985: .Xr terminfo 5
1.209 nicm 2986: capabilities.
2987: The alternate screen feature preserves the contents of the window when an
2988: interactive application starts and restores it on exit, so that any output
2989: visible before the application starts reappears unchanged after it exits.
2990: The default is on.
1.196 nicm 2991: .Pp
1.1 nicm 2992: .It Xo Ic automatic-rename
1.56 jmc 2993: .Op Ic on | off
1.1 nicm 2994: .Xc
2995: Control automatic window renaming.
2996: When this setting is enabled,
2997: .Nm
1.368 nicm 2998: will rename the window automatically using the format specified by
2999: .Ic automatic-rename-format .
1.1 nicm 3000: This flag is automatically disabled for an individual window when a name
3001: is specified at creation with
1.186 nicm 3002: .Ic new-window
3003: or
1.1 nicm 3004: .Ic new-session ,
3005: or later with
1.261 nicm 3006: .Ic rename-window ,
3007: or with a terminal escape sequence.
1.1 nicm 3008: It may be switched off globally with:
3009: .Bd -literal -offset indent
3010: set-window-option -g automatic-rename off
3011: .Ed
1.368 nicm 3012: .Pp
3013: .It Ic automatic-rename-format Ar format
3014: The format (see
3015: .Sx FORMATS )
3016: used when the
3017: .Ic automatic-rename
3018: option is enabled.
1.56 jmc 3019: .Pp
1.1 nicm 3020: .It Ic clock-mode-colour Ar colour
3021: Set clock colour.
1.56 jmc 3022: .Pp
1.1 nicm 3023: .It Xo Ic clock-mode-style
1.56 jmc 3024: .Op Ic 12 | 24
1.1 nicm 3025: .Xc
3026: Set clock hour format.
1.56 jmc 3027: .Pp
1.1 nicm 3028: .It Ic force-height Ar height
3029: .It Ic force-width Ar width
3030: Prevent
3031: .Nm
3032: from resizing a window to greater than
3033: .Ar width
3034: or
3035: .Ar height .
3036: A value of zero restores the default unlimited setting.
1.56 jmc 3037: .Pp
1.196 nicm 3038: .It Ic main-pane-height Ar height
1.2 nicm 3039: .It Ic main-pane-width Ar width
3040: Set the width or height of the main (left or top) pane in the
3041: .Ic main-horizontal
3042: or
3043: .Ic main-vertical
3044: layouts.
1.56 jmc 3045: .Pp
1.1 nicm 3046: .It Xo Ic mode-keys
1.56 jmc 3047: .Op Ic vi | emacs
1.1 nicm 3048: .Xc
1.500 nicm 3049: Use vi or emacs-style key bindings in copy mode.
3050: The default is emacs, unless
1.191 nicm 3051: .Ev VISUAL
3052: or
3053: .Ev EDITOR
3054: contains
3055: .Ql vi .
1.56 jmc 3056: .Pp
1.378 nicm 3057: .It Ic mode-style Ar style
3058: Set window modes style.
3059: For how to specify
3060: .Ar style ,
3061: see the
3062: .Ic message-command-style
3063: option.
3064: .Pp
1.1 nicm 3065: .It Xo Ic monitor-activity
1.56 jmc 3066: .Op Ic on | off
1.1 nicm 3067: .Xc
3068: Monitor for activity in the window.
3069: Windows with activity are highlighted in the status line.
1.56 jmc 3070: .Pp
1.192 nicm 3071: .It Xo Ic monitor-silence
3072: .Op Ic interval
3073: .Xc
3074: Monitor for silence (no activity) in the window within
3075: .Ic interval
3076: seconds.
3077: Windows that have been silent for the interval are highlighted in the
3078: status line.
3079: An interval of zero disables the monitoring.
1.195 nicm 3080: .Pp
3081: .It Ic other-pane-height Ar height
3082: Set the height of the other panes (not the main pane) in the
3083: .Ic main-horizontal
3084: layout.
3085: If this option is set to 0 (the default), it will have no effect.
3086: If both the
3087: .Ic main-pane-height
3088: and
3089: .Ic other-pane-height
3090: options are set, the main pane will grow taller to make the other panes the
3091: specified height, but will never shrink to do so.
3092: .Pp
3093: .It Ic other-pane-width Ar width
3094: Like
3095: .Ic other-pane-height ,
3096: but set the width of other panes in the
3097: .Ic main-vertical
3098: layout.
1.243 nicm 3099: .Pp
1.413 nicm 3100: .It Ic pane-active-border-style Ar style
3101: Set the pane border style for the currently active pane.
3102: For how to specify
3103: .Ar style ,
3104: see the
3105: .Ic message-command-style
3106: option.
3107: Attributes are ignored.
3108: .Pp
1.243 nicm 3109: .It Ic pane-base-index Ar index
3110: Like
3111: .Ic base-index ,
3112: but set the starting index for pane numbers.
1.484 nicm 3113: .Pp
3114: .It Ic pane-border-format Ar format
3115: Set the text shown in pane border status lines.
3116: .Pp
3117: .It Xo Ic pane-border-status
3118: .Op Ic off | top | bottom
3119: .Xc
3120: Turn pane border status lines off or set their position.
1.413 nicm 3121: .Pp
3122: .It Ic pane-border-style Ar style
3123: Set the pane border style for panes aside from the active pane.
3124: For how to specify
3125: .Ar style ,
3126: see the
3127: .Ic message-command-style
3128: option.
3129: Attributes are ignored.
1.192 nicm 3130: .Pp
1.1 nicm 3131: .It Xo Ic remain-on-exit
1.56 jmc 3132: .Op Ic on | off
1.1 nicm 3133: .Xc
3134: A window with this flag set is not destroyed when the program running in it
3135: exits.
3136: The window may be reactivated with the
3137: .Ic respawn-window
3138: command.
1.56 jmc 3139: .Pp
1.99 nicm 3140: .It Xo Ic synchronize-panes
3141: .Op Ic on | off
3142: .Xc
1.164 nicm 3143: Duplicate input to any pane to all other panes in the same window (only
3144: for panes that are not in any special mode).
1.56 jmc 3145: .Pp
1.418 nicm 3146: .It Ic window-active-style Ar style
3147: Set the style for the window's active pane.
3148: For how to specify
3149: .Ar style ,
3150: see the
3151: .Ic message-command-style
3152: option.
3153: .Pp
1.378 nicm 3154: .It Ic window-status-activity-style Ar style
3155: Set status line style for windows with an activity alert.
3156: For how to specify
3157: .Ar style ,
3158: see the
3159: .Ic message-command-style
3160: option.
1.169 nicm 3161: .Pp
1.378 nicm 3162: .It Ic window-status-bell-style Ar style
3163: Set status line style for windows with a bell alert.
3164: For how to specify
3165: .Ar style ,
3166: see the
3167: .Ic message-command-style
3168: option.
1.169 nicm 3169: .Pp
1.125 nicm 3170: .It Ic window-status-current-format Ar string
3171: Like
3172: .Ar window-status-format ,
3173: but is the format used when the window is the current window.
1.307 nicm 3174: .Pp
1.378 nicm 3175: .It Ic window-status-current-style Ar style
3176: Set status line style for the currently active window.
3177: For how to specify
3178: .Ar style ,
3179: see the
3180: .Ic message-command-style
3181: option.
1.239 nicm 3182: .Pp
3183: .It Ic window-status-format Ar string
3184: Set the format in which the window is displayed in the status line window list.
3185: See the
3186: .Ar status-left
3187: option for details of special character sequences available.
3188: The default is
3189: .Ql #I:#W#F .
1.290 nicm 3190: .Pp
1.378 nicm 3191: .It Ic window-status-last-style Ar style
3192: Set status line style for the last active window.
3193: For how to specify
3194: .Ar style ,
3195: see the
3196: .Ic message-command-style
3197: option.
3198: .Pp
1.290 nicm 3199: .It Ic window-status-separator Ar string
3200: Sets the separator drawn between windows in the status line.
3201: The default is a single space character.
1.125 nicm 3202: .Pp
1.378 nicm 3203: .It Ic window-status-style Ar style
3204: Set status line style for a single window.
1.418 nicm 3205: For how to specify
3206: .Ar style ,
3207: see the
3208: .Ic message-command-style
3209: option.
3210: .Pp
3211: .It Ic window-style Ar style
3212: Set the default window style.
1.378 nicm 3213: For how to specify
3214: .Ar style ,
3215: see the
3216: .Ic message-command-style
3217: option.
3218: .Pp
1.512 nicm 3219: .It Xo Ic wrap-search
3220: .Op Ic on | off
3221: .Xc
3222: If this option is set, searches will wrap around the end of the pane contents.
3223: The default is on.
1.513 nicm 3224: .Pp
1.1 nicm 3225: .It Xo Ic xterm-keys
1.56 jmc 3226: .Op Ic on | off
1.1 nicm 3227: .Xc
3228: If this option is set,
3229: .Nm
3230: will generate
1.57 jmc 3231: .Xr xterm 1 -style
3232: function key sequences; these have a number included to indicate modifiers such
3233: as Shift, Alt or Ctrl.
3234: .El
3235: .It Xo Ic show-options
1.340 nicm 3236: .Op Fl gqsvw
1.129 nicm 3237: .Op Fl t Ar target-session | Ar target-window
1.276 nicm 3238: .Op Ar option
1.57 jmc 3239: .Xc
3240: .D1 (alias: Ic show )
1.276 nicm 3241: Show the window options (or a single window option if given) with
1.129 nicm 3242: .Fl w
1.133 nicm 3243: (equivalent to
1.134 nicm 3244: .Ic show-window-options ) ,
1.133 nicm 3245: the server options with
3246: .Fl s ,
3247: otherwise the session options for
3248: .Ar target session .
3249: Global session or window options are listed if
3250: .Fl g
3251: is used.
1.317 nicm 3252: .Fl v
3253: shows only the option value, not the name.
1.340 nicm 3254: If
3255: .Fl q
3256: is set, no error will be returned if
3257: .Ar option
3258: is unset.
1.57 jmc 3259: .It Xo Ic show-window-options
1.317 nicm 3260: .Op Fl gv
1.57 jmc 3261: .Op Fl t Ar target-window
1.276 nicm 3262: .Op Ar option
1.57 jmc 3263: .Xc
3264: .D1 (alias: Ic showw )
1.276 nicm 3265: List the window options or a single option for
1.57 jmc 3266: .Ar target-window ,
3267: or the global window options if
3268: .Fl g
3269: is used.
1.317 nicm 3270: .Fl v
3271: shows only the option value, not the name.
1.63 nicm 3272: .El
1.469 nicm 3273: .Sh HOOKS
3274: .Nm
3275: allows commands to run on various triggers, called
3276: .Em hooks .
1.505 nicm 3277: Most
1.483 nicm 3278: .Nm
1.505 nicm 3279: commands have an
1.483 nicm 3280: .Em after
3281: hook and there are a number of hooks not associated with commands.
3282: .Pp
1.505 nicm 3283: A command's after
3284: hook is run after it completes, except when the command is run as part of a hook
1.483 nicm 3285: itself.
1.505 nicm 3286: They are named with an
1.483 nicm 3287: .Ql after-
3288: prefix.
3289: For example, the following command adds a hook to select the even-vertical
3290: layout after every
3291: .Ic split-window :
3292: .Bd -literal -offset indent
3293: set-hook after-split-window "selectl even-vertical"
3294: .Ed
3295: .Pp
3296: In addition, the following hooks are available:
1.560 nicm 3297: .Bl -tag -width "XXXXXXXXXXXXXXXXXXXXXX"
1.476 nicm 3298: .It alert-activity
3299: Run when a window has activity.
3300: See
3301: .Ic monitor-activity .
3302: .It alert-bell
3303: Run when a window has received a bell.
3304: .It alert-silence
3305: Run when a window has been silent.
3306: See
3307: .Ic monitor-silence .
1.469 nicm 3308: .It client-attached
3309: Run when a client is attached.
3310: .It client-detached
3311: Run when a client is detached
3312: .It client-resized
3313: Run when a client is resized.
1.511 nicm 3314: .It client-session-changed
3315: Run when a client's attached session is changed.
1.475 nicm 3316: .It pane-died
3317: Run when the program running in a pane exits, but
3318: .Ic remain-on-exit
3319: is on so the pane has not closed.
3320: .It pane-exited
3321: Run when the program running in a pane exits.
1.560 nicm 3322: .It pane-set-clipboard
3323: Run when the terminal clipboard is set using the
3324: .Xr xterm 1
3325: escape sequence.
1.510 nicm 3326: .It session-created
3327: Run when a new session created.
3328: .It session-closed
3329: Run when a session closed.
1.507 nicm 3330: .It session-renamed
3331: Run when a session is renamed.
1.511 nicm 3332: .It window-linked
3333: Run when a window is linked into a session.
1.507 nicm 3334: .It window-renamed
3335: Run when a window is renamed.
1.511 nicm 3336: .It window-unlinked
3337: Run when a window is unlinked from a session.
1.469 nicm 3338: .El
3339: .Pp
3340: Hooks are managed with these commands:
3341: .Bl -tag -width Ds
3342: .It Xo Ic set-hook
1.496 nicm 3343: .Op Fl gu
1.469 nicm 3344: .Op Fl t Ar target-session
3345: .Ar hook-name
3346: .Ar command
3347: .Xc
1.496 nicm 3348: Sets (or with
3349: .Fl u
3350: unsets) hook
1.469 nicm 3351: .Ar hook-name
3352: to
3353: .Ar command .
3354: If
3355: .Fl g
3356: is given,
3357: .Em hook-name
3358: is added to the global list of hooks, otherwise it is added to the session
3359: hooks (for
3360: .Ar target-session
3361: with
3362: .Fl t ) .
3363: Like options, session hooks inherit from the global ones.
3364: .It Xo Ic show-hooks
3365: .Op Fl g
3366: .Op Fl t Ar target-session
3367: .Xc
3368: Shows the global list of hooks with
3369: .Fl g ,
3370: otherwise the session hooks.
1.470 jmc 3371: .El
1.419 nicm 3372: .Sh MOUSE SUPPORT
3373: If the
3374: .Ic mouse
3375: option is on (the default is off),
3376: .Nm
3377: allows mouse events to be bound as keys.
3378: The name of each key is made up of a mouse event (such as
3379: .Ql MouseUp1 )
3380: and a location suffix (one of
3381: .Ql Pane
3382: for the contents of a pane,
3383: .Ql Border
3384: for a pane border or
3385: .Ql Status
3386: for the status line).
3387: The following mouse events are available:
3388: .Bl -column "MouseDown1" "MouseDrag1" "WheelDown" -offset indent
1.498 nicm 3389: .It Li "WheelUp" Ta "WheelDown" Ta ""
1.481 nicm 3390: .It Li "MouseDown1" Ta "MouseUp1" Ta "MouseDrag1" Ta "MouseDragEnd1"
3391: .It Li "MouseDown2" Ta "MouseUp2" Ta "MouseDrag2" Ta "MouseDragEnd2"
3392: .It Li "MouseDown3" Ta "MouseUp3" Ta "MouseDrag3" Ta "MouseDragEnd3"
1.498 nicm 3393: .It Li "DoubleClick1" Ta "DoubleClick2" Ta "DoubleClick3" Ta "WheelUp"
3394: .It Li "TripleClick1" Ta "TripleClick2" Ta "TripleClick3" Ta "WheelDown"
1.419 nicm 3395: .El
3396: .Pp
3397: Each should be suffixed with a location, for example
3398: .Ql MouseDown1Status .
3399: .Pp
1.423 nicm 3400: The special token
3401: .Ql {mouse}
3402: or
1.419 nicm 3403: .Ql =
3404: may be used as
3405: .Ar target-window
3406: or
3407: .Ar target-pane
3408: in commands bound to mouse key bindings.
3409: It resolves to the window or pane over which the mouse event took place
3410: (for example, the window in the status line over which button 1 was released for a
3411: .Ql MouseUp1Status
3412: binding, or the pane over which the wheel was scrolled for a
3413: .Ql WheelDownPane
3414: binding).
3415: .Pp
3416: The
3417: .Ic send-keys
3418: .Fl M
3419: flag may be used to forward a mouse event to a pane.
3420: .Pp
3421: The default key bindings allow the mouse to be used to select and resize panes,
3422: to copy text and to change window using the status line.
3423: These take effect if the
3424: .Ic mouse
3425: option is turned on.
1.245 nicm 3426: .Sh FORMATS
1.294 nicm 3427: Certain commands accept the
1.245 nicm 3428: .Fl F
3429: flag with a
3430: .Ar format
3431: argument.
3432: This is a string which controls the output format of the command.
3433: Replacement variables are enclosed in
3434: .Ql #{
3435: and
3436: .Ql } ,
3437: for example
1.359 nicm 3438: .Ql #{session_name} .
1.409 nicm 3439: The possible variables are listed in the table below, or the name of a
3440: .Nm
3441: option may be used for an option's value.
3442: Some variables have a shorter alias such as
3443: .Ql #S ,
3444: and
1.376 nicm 3445: .Ql ##
3446: is replaced by a single
3447: .Ql # .
1.409 nicm 3448: .Pp
3449: Conditionals are available by prefixing with
1.246 jmc 3450: .Ql \&?
1.245 nicm 3451: and separating two alternatives with a comma;
3452: if the specified variable exists and is not zero, the first alternative
1.246 jmc 3453: is chosen, otherwise the second is used.
3454: For example
1.245 nicm 3455: .Ql #{?session_attached,attached,not attached}
3456: will include the string
3457: .Ql attached
3458: if the session is attached and the string
3459: .Ql not attached
1.409 nicm 3460: if it is unattached, or
3461: .Ql #{?automatic-rename,yes,no}
3462: will include
3463: .Ql yes
3464: if
3465: .Ic automatic-rename
3466: is enabled, or
3467: .Ql no
3468: if not.
1.520 nicm 3469: .Pp
1.554 nicm 3470: Comparisons may be expressed by prefixing two comma-separated
1.520 nicm 3471: alternatives by
3472: .Ql ==
3473: or
3474: .Ql !=
3475: and a colon.
3476: For example
1.544 nicm 3477: .Ql #{==:#{host},myhost}
1.520 nicm 3478: will be replaced by
3479: .Ql 1
3480: if running on
3481: .Ql myhost ,
3482: otherwise by
1.554 nicm 3483: .Ql 0 .
1.553 nicm 3484: An
3485: .Ql m
1.554 nicm 3486: specifies an
1.553 nicm 3487: .Xr fnmatch 3
1.554 nicm 3488: comparison where the first argument is the pattern and the second the string to
3489: compare, for example
1.553 nicm 3490: .Ql #{m:*foo*,#{host}} .
1.554 nicm 3491: .Ql ||
3492: and
3493: .Ql &&
3494: evaluate to true if either or both of two comma-separated alternatives are
3495: true, for example
3496: .Ql #{||,#{pane_in_mode},#{alternate_on}} .
3497: A
3498: .Ql C
3499: performs a search for an
3500: .Xr fnmatch 3
3501: pattern in the pane content and evaluates to zero if not found, or a line
3502: number if found.
1.453 nicm 3503: .Pp
1.367 nicm 3504: A limit may be placed on the length of the resultant string by prefixing it
3505: by an
3506: .Ql = ,
1.479 nicm 3507: a number and a colon.
3508: Positive numbers count from the start of the string and negative from the end,
3509: so
3510: .Ql #{=5:pane_title}
3511: will include at most the first 5 characters of the pane title, or
3512: .Ql #{=-5:pane_title}
3513: the last 5 characters.
1.453 nicm 3514: Prefixing a time variable with
3515: .Ql t:
3516: will convert it to a string, so if
3517: .Ql #{window_activity}
3518: gives
1.454 jmc 3519: .Ql 1445765102 ,
1.453 nicm 3520: .Ql #{t:window_activity}
3521: gives
3522: .Ql Sun Oct 25 09:25:02 2015 .
3523: The
3524: .Ql b:
3525: and
3526: .Ql d:
3527: prefixes are
3528: .Xr basename 3
3529: and
3530: .Xr dirname 3
3531: of the variable respectively.
1.461 nicm 3532: A prefix of the form
3533: .Ql s/foo/bar/:
3534: will substitute
3535: .Ql foo
3536: with
3537: .Ql bar
3538: throughout.
1.431 nicm 3539: .Pp
3540: In addition, the first line of a shell command's output may be inserted using
3541: .Ql #() .
3542: For example,
3543: .Ql #(uptime)
3544: will insert the system's uptime.
3545: When constructing formats,
3546: .Nm
3547: does not wait for
3548: .Ql #()
3549: commands to finish; instead, the previous result from running the same command is used,
3550: or a placeholder if the command has not been run before.
1.543 nicm 3551: If the command hasn't exited, the most recent line of output will be used, but the status
3552: line will not be updated more than once a second.
1.431 nicm 3553: Commands are executed with the
3554: .Nm
3555: global environment set (see the
3556: .Sx ENVIRONMENT
3557: section).
1.245 nicm 3558: .Pp
3559: The following variables are available, where appropriate:
1.359 nicm 3560: .Bl -column "XXXXXXXXXXXXXXXXXXX" "XXXXX"
3561: .It Sy "Variable name" Ta Sy "Alias" Ta Sy "Replaced with"
3562: .It Li "alternate_on" Ta "" Ta "If pane is in alternate screen"
3563: .It Li "alternate_saved_x" Ta "" Ta "Saved cursor X in alternate screen"
3564: .It Li "alternate_saved_y" Ta "" Ta "Saved cursor Y in alternate screen"
1.490 nicm 3565: .It Li "buffer_name" Ta "" Ta "Name of buffer"
1.386 nicm 3566: .It Li "buffer_sample" Ta "" Ta "Sample of start of buffer"
1.359 nicm 3567: .It Li "buffer_size" Ta "" Ta "Size of the specified buffer in bytes"
3568: .It Li "client_activity" Ta "" Ta "Integer time client last had activity"
3569: .It Li "client_created" Ta "" Ta "Integer time client created"
1.443 nicm 3570: .It Li "client_control_mode" Ta "" Ta "1 if client is in control mode"
1.542 nicm 3571: .It Li "client_discarded" Ta "" Ta "Bytes discarded when client behind"
1.359 nicm 3572: .It Li "client_height" Ta "" Ta "Height of client"
1.451 nicm 3573: .It Li "client_key_table" Ta "" Ta "Current key table"
1.359 nicm 3574: .It Li "client_last_session" Ta "" Ta "Name of the client's last session"
1.540 nicm 3575: .It Li "client_name" Ta "" Ta "Name of client"
1.437 nicm 3576: .It Li "client_pid" Ta "" Ta "PID of client process"
1.359 nicm 3577: .It Li "client_prefix" Ta "" Ta "1 if prefix key has been pressed"
3578: .It Li "client_readonly" Ta "" Ta "1 if client is readonly"
3579: .It Li "client_session" Ta "" Ta "Name of the client's session"
3580: .It Li "client_termname" Ta "" Ta "Terminal name of client"
1.524 nicm 3581: .It Li "client_termtype" Ta "" Ta "Terminal type of client"
1.359 nicm 3582: .It Li "client_tty" Ta "" Ta "Pseudo terminal of client"
3583: .It Li "client_utf8" Ta "" Ta "1 if client supports utf8"
3584: .It Li "client_width" Ta "" Ta "Width of client"
1.541 nicm 3585: .It Li "client_written" Ta "" Ta "Bytes written to client"
1.509 nicm 3586: .It Li "command" Ta "" Ta "Name of command in use, if any"
1.489 nicm 3587: .It Li "command_list_name" Ta "" Ta "Command name if listing commands"
3588: .It Li "command_list_alias" Ta "" Ta "Command alias if listing commands"
3589: .It Li "command_list_usage" Ta "" Ta "Command usage if listing commands"
1.359 nicm 3590: .It Li "cursor_flag" Ta "" Ta "Pane cursor flag"
3591: .It Li "cursor_x" Ta "" Ta "Cursor X position in pane"
3592: .It Li "cursor_y" Ta "" Ta "Cursor Y position in pane"
3593: .It Li "history_bytes" Ta "" Ta "Number of bytes in window history"
3594: .It Li "history_limit" Ta "" Ta "Maximum window history lines"
3595: .It Li "history_size" Ta "" Ta "Size of history in bytes"
1.509 nicm 3596: .It Li "hook" Ta "" Ta "Name of running hook, if any"
1.511 nicm 3597: .It Li "hook_pane" Ta "" Ta "ID of pane where hook was run, if any"
1.510 nicm 3598: .It Li "hook_session" Ta "" Ta "ID of session where hook was run, if any"
3599: .It Li "hook_session_name" Ta "" Ta "Name of session where hook was run, if any"
3600: .It Li "hook_window" Ta "" Ta "ID of window where hook was run, if any"
3601: .It Li "hook_window_name" Ta "" Ta "Name of window where hook was run, if any"
1.359 nicm 3602: .It Li "host" Ta "#H" Ta "Hostname of local host"
3603: .It Li "host_short" Ta "#h" Ta "Hostname of local host (no domain name)"
3604: .It Li "insert_flag" Ta "" Ta "Pane insert flag"
3605: .It Li "keypad_cursor_flag" Ta "" Ta "Pane keypad cursor flag"
3606: .It Li "keypad_flag" Ta "" Ta "Pane keypad flag"
3607: .It Li "line" Ta "" Ta "Line number in the list"
3608: .It Li "mouse_any_flag" Ta "" Ta "Pane mouse any flag"
3609: .It Li "mouse_button_flag" Ta "" Ta "Pane mouse button flag"
3610: .It Li "mouse_standard_flag" Ta "" Ta "Pane mouse standard flag"
1.533 nicm 3611: .It Li "mouse_all_flag" Ta "" Ta "Pane mouse all flag"
1.359 nicm 3612: .It Li "pane_active" Ta "" Ta "1 if active pane"
1.396 nicm 3613: .It Li "pane_bottom" Ta "" Ta "Bottom of pane"
1.359 nicm 3614: .It Li "pane_current_command" Ta "" Ta "Current command if available"
3615: .It Li "pane_dead" Ta "" Ta "1 if pane is dead"
1.411 nicm 3616: .It Li "pane_dead_status" Ta "" Ta "Exit status of process in dead pane"
1.359 nicm 3617: .It Li "pane_height" Ta "" Ta "Height of pane"
3618: .It Li "pane_id" Ta "#D" Ta "Unique pane ID"
3619: .It Li "pane_in_mode" Ta "" Ta "If pane is in a mode"
1.404 nicm 3620: .It Li "pane_input_off" Ta "" Ta "If input to pane is disabled"
1.359 nicm 3621: .It Li "pane_index" Ta "#P" Ta "Index of pane"
1.396 nicm 3622: .It Li "pane_left" Ta "" Ta "Left of pane"
1.549 nicm 3623: .It Li "pane_mode" Ta "" Ta "Name of pane mode, if any."
1.359 nicm 3624: .It Li "pane_pid" Ta "" Ta "PID of first process in pane"
1.567 nicm 3625: .It Li "pane_pipe" Ta "" Ta "1 if pane is being piped"
1.396 nicm 3626: .It Li "pane_right" Ta "" Ta "Right of pane"
1.546 nicm 3627: .It Li "pane_search_string" Ta "" Ta "Last search string in copy mode"
1.359 nicm 3628: .It Li "pane_start_command" Ta "" Ta "Command pane started with"
1.396 nicm 3629: .It Li "pane_synchronized" Ta "" Ta "If pane is synchronized"
1.359 nicm 3630: .It Li "pane_tabs" Ta "" Ta "Pane tab positions"
3631: .It Li "pane_title" Ta "#T" Ta "Title of pane"
1.396 nicm 3632: .It Li "pane_top" Ta "" Ta "Top of pane"
1.359 nicm 3633: .It Li "pane_tty" Ta "" Ta "Pseudo terminal of pane"
3634: .It Li "pane_width" Ta "" Ta "Width of pane"
1.437 nicm 3635: .It Li "pid" Ta "" Ta "Server PID"
1.359 nicm 3636: .It Li "scroll_region_lower" Ta "" Ta "Bottom of scroll region in pane"
3637: .It Li "scroll_region_upper" Ta "" Ta "Top of scroll region in pane"
1.452 nicm 3638: .It Li "scroll_position" Ta "" Ta "Scroll position in copy mode"
1.430 nicm 3639: .It Li "session_alerts" Ta "" Ta "List of window indexes with alerts"
1.382 nicm 3640: .It Li "session_attached" Ta "" Ta "Number of clients session is attached to"
1.415 nicm 3641: .It Li "session_activity" Ta "" Ta "Integer time of session last activity"
1.359 nicm 3642: .It Li "session_created" Ta "" Ta "Integer time session created"
1.449 nicm 3643: .It Li "session_last_attached" Ta "" Ta "Integer time session last attached"
1.536 nicm 3644: .It Li "session_group" Ta "" Ta "Name of session group"
1.359 nicm 3645: .It Li "session_grouped" Ta "" Ta "1 if session in a group"
3646: .It Li "session_height" Ta "" Ta "Height of session"
3647: .It Li "session_id" Ta "" Ta "Unique session ID"
1.382 nicm 3648: .It Li "session_many_attached" Ta "" Ta "1 if multiple clients attached"
1.359 nicm 3649: .It Li "session_name" Ta "#S" Ta "Name of session"
1.548 nicm 3650: .It Li "session_stack" Ta "" Ta "Window indexes in most recent order"
1.359 nicm 3651: .It Li "session_width" Ta "" Ta "Width of session"
3652: .It Li "session_windows" Ta "" Ta "Number of windows in session"
1.487 nicm 3653: .It Li "socket_path" Ta "" Ta "Server socket path"
1.465 nicm 3654: .It Li "start_time" Ta "" Ta "Server start time"
1.438 nicm 3655: .It Li "window_activity" Ta "" Ta "Integer time of window last activity"
1.487 nicm 3656: .It Li "window_activity_flag" Ta "" Ta "1 if window has activity"
1.359 nicm 3657: .It Li "window_active" Ta "" Ta "1 if window active"
1.366 nicm 3658: .It Li "window_bell_flag" Ta "" Ta "1 if window has bell"
1.359 nicm 3659: .It Li "window_find_matches" Ta "" Ta "Matched data from the find-window"
3660: .It Li "window_flags" Ta "#F" Ta "Window flags"
3661: .It Li "window_height" Ta "" Ta "Height of window"
3662: .It Li "window_id" Ta "" Ta "Unique window ID"
3663: .It Li "window_index" Ta "#I" Ta "Index of window"
1.400 nicm 3664: .It Li "window_last_flag" Ta "" Ta "1 if window is the last used"
1.460 nicm 3665: .It Li "window_layout" Ta "" Ta "Window layout description, ignoring zoomed window panes"
1.426 nicm 3666: .It Li "window_linked" Ta "" Ta "1 if window is linked across sessions"
1.359 nicm 3667: .It Li "window_name" Ta "#W" Ta "Name of window"
3668: .It Li "window_panes" Ta "" Ta "Number of panes in window"
1.366 nicm 3669: .It Li "window_silence_flag" Ta "" Ta "1 if window has silence alert"
1.548 nicm 3670: .It Li "window_stack_index" Ta "" Ta "Index in session most recent stack"
1.460 nicm 3671: .It Li "window_visible_layout" Ta "" Ta "Window layout description, respecting zoomed window panes"
1.359 nicm 3672: .It Li "window_width" Ta "" Ta "Width of window"
1.400 nicm 3673: .It Li "window_zoomed_flag" Ta "" Ta "1 if window is zoomed"
1.359 nicm 3674: .It Li "wrap_flag" Ta "" Ta "Pane wrap flag"
1.245 nicm 3675: .El
1.261 nicm 3676: .Sh NAMES AND TITLES
3677: .Nm
3678: distinguishes between names and titles.
3679: Windows and sessions have names, which may be used to specify them in targets
3680: and are displayed in the status line and various lists: the name is the
3681: .Nm
3682: identifier for a window or session.
3683: Only panes have titles.
3684: A pane's title is typically set by the program running inside the pane and
3685: is not modified by
3686: .Nm .
3687: It is the same mechanism used to set for example the
3688: .Xr xterm 1
3689: window title in an
3690: .Xr X 7
3691: window manager.
1.268 nicm 3692: Windows themselves do not have titles - a window's title is the title of its
1.261 nicm 3693: active pane.
3694: .Nm
3695: itself may set the title of the terminal in which the client is running, see
3696: the
3697: .Ic set-titles
3698: option.
3699: .Pp
3700: A session's name is set with the
3701: .Ic new-session
3702: and
3703: .Ic rename-session
3704: commands.
3705: A window's name is set with one of:
3706: .Bl -enum -width Ds
3707: .It
3708: A command argument (such as
3709: .Fl n
3710: for
3711: .Ic new-window
3712: or
3713: .Ic new-session ) .
3714: .It
3715: An escape sequence:
3716: .Bd -literal -offset indent
3717: $ printf '\e033kWINDOW_NAME\e033\e\e'
3718: .Ed
3719: .It
3720: Automatic renaming, which sets the name to the active command in the window's
3721: active pane.
3722: See the
3723: .Ic automatic-rename
3724: option.
3725: .El
3726: .Pp
3727: When a pane is first created, its title is the hostname.
3728: A pane's title can be set via the OSC title setting sequence, for example:
3729: .Bd -literal -offset indent
3730: $ printf '\e033]2;My Title\e033\e\e'
3731: .Ed
1.63 nicm 3732: .Sh ENVIRONMENT
3733: When the server is started,
3734: .Nm
3735: copies the environment into the
3736: .Em global environment ;
3737: in addition, each session has a
3738: .Em session environment .
1.193 nicm 3739: When a window is created, the session and global environments are merged.
3740: If a variable exists in both, the value from the session environment is used.
3741: The result is the initial environment passed to the new process.
1.63 nicm 3742: .Pp
3743: The
3744: .Ic update-environment
3745: session option may be used to update the session environment from the client
3746: when a new session is created or an old reattached.
3747: .Nm
3748: also initialises the
3749: .Ev TMUX
3750: variable with some internal information to allow commands to be executed
3751: from inside, and the
3752: .Ev TERM
3753: variable with the correct terminal setting of
3754: .Ql screen .
3755: .Pp
3756: Commands to alter and view the environment are:
3757: .Bl -tag -width Ds
3758: .It Xo Ic set-environment
3759: .Op Fl gru
3760: .Op Fl t Ar target-session
3761: .Ar name Op Ar value
3762: .Xc
1.115 nicm 3763: .D1 (alias: Ic setenv )
1.63 nicm 3764: Set or unset an environment variable.
3765: If
3766: .Fl g
3767: is used, the change is made in the global environment; otherwise, it is applied
3768: to the session environment for
3769: .Ar target-session .
3770: The
3771: .Fl u
3772: flag unsets a variable.
3773: .Fl r
3774: indicates the variable is to be removed from the environment before starting a
3775: new process.
3776: .It Xo Ic show-environment
1.442 nicm 3777: .Op Fl gs
1.63 nicm 3778: .Op Fl t Ar target-session
1.286 nicm 3779: .Op Ar variable
1.63 nicm 3780: .Xc
1.115 nicm 3781: .D1 (alias: Ic showenv )
1.63 nicm 3782: Display the environment for
3783: .Ar target-session
3784: or the global environment with
3785: .Fl g .
1.286 nicm 3786: If
3787: .Ar variable
3788: is omitted, all variables are shown.
1.63 nicm 3789: Variables removed from the environment are prefixed with
3790: .Ql - .
1.442 nicm 3791: If
3792: .Fl s
3793: is used, the output is formatted as a set of Bourne shell commands.
1.57 jmc 3794: .El
3795: .Sh STATUS LINE
3796: .Nm
3797: includes an optional status line which is displayed in the bottom line of each
3798: terminal.
3799: By default, the status line is enabled (it may be disabled with the
3800: .Ic status
3801: session option) and contains, from left-to-right: the name of the current
1.261 nicm 3802: session in square brackets; the window list; the title of the active pane
3803: in double quotes; and the time and date.
1.57 jmc 3804: .Pp
3805: The status line is made of three parts: configurable left and right sections
3806: (which may contain dynamic content such as the time or output from a shell
3807: command, see the
3808: .Ic status-left ,
3809: .Ic status-left-length ,
3810: .Ic status-right ,
3811: and
3812: .Ic status-right-length
3813: options below), and a central window list.
1.125 nicm 3814: By default, the window list shows the index, name and (if any) flag of the
3815: windows present in the current session in ascending numerical order.
3816: It may be customised with the
3817: .Ar window-status-format
3818: and
3819: .Ar window-status-current-format
3820: options.
1.57 jmc 3821: The flag is one of the following symbols appended to the window name:
3822: .Bl -column "Symbol" "Meaning" -offset indent
3823: .It Sy "Symbol" Ta Sy "Meaning"
3824: .It Li "*" Ta "Denotes the current window."
3825: .It Li "-" Ta "Marks the last window (previously selected)."
3826: .It Li "#" Ta "Window is monitored and activity has been detected."
1.557 nicm 3827: .It Li "\&!" Ta "A bell has occurred in the window."
1.192 nicm 3828: .It Li "~" Ta "The window has been silent for the monitor-silence interval."
1.432 nicm 3829: .It Li "M" Ta "The window contains the marked pane."
1.349 nicm 3830: .It Li "Z" Ta "The window's active pane is zoomed."
1.57 jmc 3831: .El
3832: .Pp
3833: The # symbol relates to the
3834: .Ic monitor-activity
1.388 nicm 3835: window option.
1.57 jmc 3836: The window name is printed in inverted colours if an alert (bell, activity or
1.388 nicm 3837: silence) is present.
1.57 jmc 3838: .Pp
1.131 nicm 3839: The colour and attributes of the status line may be configured, the entire
3840: status line using the
1.378 nicm 3841: .Ic status-style
3842: session option and individual windows using the
3843: .Ic window-status-style
3844: window option.
1.57 jmc 3845: .Pp
1.131 nicm 3846: The status line is automatically refreshed at interval if it has changed, the
3847: interval may be controlled with the
1.57 jmc 3848: .Ic status-interval
3849: session option.
3850: .Pp
3851: Commands related to the status line are as follows:
3852: .Bl -tag -width Ds
3853: .It Xo Ic command-prompt
1.517 nicm 3854: .Op Fl 1i
1.235 nicm 3855: .Op Fl I Ar inputs
1.73 nicm 3856: .Op Fl p Ar prompts
1.57 jmc 3857: .Op Fl t Ar target-client
3858: .Op Ar template
3859: .Xc
3860: Open the command prompt in a client.
3861: This may be used from inside
3862: .Nm
3863: to execute commands interactively.
1.231 nicm 3864: .Pp
1.57 jmc 3865: If
3866: .Ar template
1.73 nicm 3867: is specified, it is used as the command.
1.235 nicm 3868: If present,
3869: .Fl I
3870: is a comma-separated list of the initial text for each prompt.
1.73 nicm 3871: If
3872: .Fl p
3873: is given,
3874: .Ar prompts
3875: is a comma-separated list of prompts which are displayed in order; otherwise
3876: a single prompt is displayed, constructed from
3877: .Ar template
3878: if it is present, or
3879: .Ql \&:
3880: if not.
1.231 nicm 3881: .Pp
1.73 nicm 3882: Before the command is executed, the first occurrence of the string
3883: .Ql %%
1.74 jmc 3884: and all occurrences of
1.73 nicm 3885: .Ql %1
1.492 nicm 3886: are replaced by the response to the first prompt, all
1.73 nicm 3887: .Ql %2
3888: are replaced with the response to the second prompt, and so on for further
1.74 jmc 3889: prompts.
3890: Up to nine prompt responses may be replaced
3891: .Po
3892: .Ql %1
1.73 nicm 3893: to
1.74 jmc 3894: .Ql %9
3895: .Pc .
1.513 nicm 3896: .Ql %%%
3897: is like
3898: .Ql %%
3899: but any quotation marks are escaped.
1.497 nicm 3900: .Pp
3901: .Fl 1
3902: makes the prompt only accept one key press, in this case the resulting input
3903: is a single character.
1.517 nicm 3904: .Fl i
3905: executes the command every time the prompt input changes instead of when the
3906: user exits the command prompt.
1.500 nicm 3907: .Pp
3908: The following keys have a special meaning in the command prompt, depending
3909: on the value of the
3910: .Ic status-keys
3911: option:
3912: .Bl -column "FunctionXXXXXXXXXXXXXXXXXXXXXXXXX" "viXXXX" "emacsX" -offset indent
3913: .It Sy "Function" Ta Sy "vi" Ta Sy "emacs"
3914: .It Li "Cancel command prompt" Ta "Escape" Ta "Escape"
3915: .It Li "Delete current word" Ta "" Ta "C-w"
3916: .It Li "Delete entire command" Ta "d" Ta "C-u"
3917: .It Li "Delete from cursor to end" Ta "D" Ta "C-k"
3918: .It Li "Execute command" Ta "Enter" Ta "Enter"
3919: .It Li "Get next command from history" Ta "" Ta "Down"
3920: .It Li "Get previous command from history" Ta "" Ta "Up"
3921: .It Li "Insert top paste buffer" Ta "p" Ta "C-y"
3922: .It Li "Look for completions" Ta "Tab" Ta "Tab"
3923: .It Li "Move cursor left" Ta "h" Ta "Left"
3924: .It Li "Move cursor right" Ta "l" Ta "Right"
3925: .It Li "Move cursor to end" Ta "$" Ta "C-e"
3926: .It Li "Move cursor to next word" Ta "w" Ta "M-f"
3927: .It Li "Move cursor to previous word" Ta "b" Ta "M-b"
3928: .It Li "Move cursor to start" Ta "0" Ta "C-a"
3929: .It Li "Transpose characters" Ta "" Ta "C-t"
3930: .El
1.57 jmc 3931: .It Xo Ic confirm-before
1.238 nicm 3932: .Op Fl p Ar prompt
1.57 jmc 3933: .Op Fl t Ar target-client
3934: .Ar command
3935: .Xc
3936: .D1 (alias: Ic confirm )
3937: Ask for confirmation before executing
3938: .Ar command .
1.238 nicm 3939: If
3940: .Fl p
3941: is given,
3942: .Ar prompt
3943: is the prompt to display; otherwise a prompt is constructed from
3944: .Ar command .
3945: It may contain the special character sequences supported by the
3946: .Ic status-left
3947: option.
3948: .Pp
1.57 jmc 3949: This command works only from inside
3950: .Nm .
3951: .It Xo Ic display-message
1.127 nicm 3952: .Op Fl p
1.215 nicm 3953: .Op Fl c Ar target-client
3954: .Op Fl t Ar target-pane
1.57 jmc 3955: .Op Ar message
3956: .Xc
3957: .D1 (alias: Ic display )
1.127 nicm 3958: Display a message.
3959: If
3960: .Fl p
3961: is given, the output is printed to stdout, otherwise it is displayed in the
3962: .Ar target-client
3963: status line.
1.122 nicm 3964: The format of
1.124 jmc 3965: .Ar message
1.275 nicm 3966: is described in the
3967: .Sx FORMATS
3968: section; information is taken from
1.215 nicm 3969: .Ar target-pane
3970: if
3971: .Fl t
3972: is given, otherwise the active pane for the session attached to
3973: .Ar target-client .
1.57 jmc 3974: .El
3975: .Sh BUFFERS
3976: .Nm
1.392 nicm 3977: maintains a set of named
1.199 nicm 3978: .Em paste buffers .
1.392 nicm 3979: Each buffer may be either explicitly or automatically named.
3980: Explicitly named buffers are named when created with the
3981: .Ic set-buffer
3982: or
3983: .Ic load-buffer
3984: commands, or by renaming an automatically named buffer with
3985: .Ic set-buffer
3986: .Fl n .
3987: Automatically named buffers are given a name such as
3988: .Ql buffer0001 ,
3989: .Ql buffer0002
3990: and so on.
3991: When the
3992: .Ic buffer-limit
3993: option is reached, the oldest automatically named buffer is deleted.
1.493 nicm 3994: Explicitly named buffers are not subject to
1.57 jmc 3995: .Ic buffer-limit
1.392 nicm 3996: and may be deleted with
3997: .Ic delete-buffer
3998: command.
3999: .Pp
1.57 jmc 4000: Buffers may be added using
4001: .Ic copy-mode
4002: or the
4003: .Ic set-buffer
1.392 nicm 4004: and
4005: .Ic load-buffer
4006: commands, and pasted into a window using the
1.57 jmc 4007: .Ic paste-buffer
4008: command.
1.392 nicm 4009: If a buffer command is used and no buffer is specified, the most
4010: recently added automatically named buffer is assumed.
1.57 jmc 4011: .Pp
4012: A configurable history buffer is also maintained for each window.
4013: By default, up to 2000 lines are kept; this can be altered with the
4014: .Ic history-limit
4015: option (see the
4016: .Ic set-option
4017: command above).
4018: .Pp
4019: The buffer commands are as follows:
4020: .Bl -tag -width Ds
1.178 nicm 4021: .It Xo
4022: .Ic choose-buffer
1.562 nicm 4023: .Op Fl f Ar filter
1.561 nicm 4024: .Op Fl O Ar sort-order
1.555 nicm 4025: .Op Fl t Ar target-pane
1.178 nicm 4026: .Op Ar template
4027: .Xc
1.555 nicm 4028: Put a pane into buffer mode, where a buffer may be chosen interactively from
4029: a list.
4030: The following keys may be used in buffer mode:
4031: .Bl -column "Key" "Function" -offset indent
4032: .It Sy "Key" Ta Sy "Function"
4033: .It Li "Enter" Ta "Choose selected buffer"
4034: .It Li "Up" Ta "Select previous buffer"
4035: .It Li "Down" Ta "Select next buffer"
1.559 nicm 4036: .It Li "C-s" Ta "Search by name or content"
4037: .It Li "n" Ta "Repeat last search"
1.555 nicm 4038: .It Li "t" Ta "Toggle if buffer is tagged"
4039: .It Li "T" Ta "Tag no buffers"
4040: .It Li "C-t" Ta "Tag all buffers"
4041: .It Li "d" Ta "Delete selected buffer"
4042: .It Li "D" Ta "Delete tagged buffers"
1.562 nicm 4043: .It Li "f" Ta "Enter a format to filter items"
1.555 nicm 4044: .It Li "O" Ta "Change sort order"
4045: .It Li "q" Ta "Exit mode"
4046: .El
4047: .Pp
4048: After a buffer is chosen,
1.178 nicm 4049: .Ql %%
1.392 nicm 4050: is replaced by the buffer name in
1.178 nicm 4051: .Ar template
4052: and the result executed as a command.
4053: If
4054: .Ar template
4055: is not given, "paste-buffer -b '%%'" is used.
1.555 nicm 4056: .Pp
1.561 nicm 4057: .Fl O
4058: specifies the initial sort order: one of
4059: .Ql time ,
4060: .Ql name
4061: or
4062: .Ql size .
1.562 nicm 4063: .Fl f
4064: specifies an initial filter.
1.314 nicm 4065: This command works only if at least one client is attached.
1.57 jmc 4066: .It Ic clear-history Op Fl t Ar target-pane
4067: .D1 (alias: Ic clearhist )
4068: Remove and free the history for the specified pane.
1.392 nicm 4069: .It Ic delete-buffer Op Fl b Ar buffer-name
1.57 jmc 4070: .D1 (alias: Ic deleteb )
1.392 nicm 4071: Delete the buffer named
4072: .Ar buffer-name ,
4073: or the most recently added automatically named buffer if not specified.
1.294 nicm 4074: .It Xo Ic list-buffers
4075: .Op Fl F Ar format
4076: .Xc
1.57 jmc 4077: .D1 (alias: Ic lsb )
1.198 nicm 4078: List the global buffers.
1.294 nicm 4079: For the meaning of the
4080: .Fl F
4081: flag, see the
4082: .Sx FORMATS
4083: section.
1.200 jmc 4084: .It Xo Ic load-buffer
1.392 nicm 4085: .Op Fl b Ar buffer-name
1.57 jmc 4086: .Ar path
4087: .Xc
4088: .D1 (alias: Ic loadb )
4089: Load the contents of the specified paste buffer from
4090: .Ar path .
4091: .It Xo Ic paste-buffer
1.278 nicm 4092: .Op Fl dpr
1.392 nicm 4093: .Op Fl b Ar buffer-name
1.170 nicm 4094: .Op Fl s Ar separator
1.158 nicm 4095: .Op Fl t Ar target-pane
1.57 jmc 4096: .Xc
4097: .D1 (alias: Ic pasteb )
1.158 nicm 4098: Insert the contents of a paste buffer into the specified pane.
4099: If not specified, paste into the current one.
1.57 jmc 4100: With
4101: .Fl d ,
1.392 nicm 4102: also delete the paste buffer.
1.57 jmc 4103: When output, any linefeed (LF) characters in the paste buffer are replaced with
1.170 nicm 4104: a separator, by default carriage return (CR).
4105: A custom separator may be specified using the
4106: .Fl s
4107: flag.
4108: The
1.57 jmc 4109: .Fl r
1.170 nicm 4110: flag means to do no replacement (equivalent to a separator of LF).
1.278 nicm 4111: If
4112: .Fl p
4113: is specified, paste bracket control codes are inserted around the
4114: buffer if the application has requested bracketed paste mode.
1.57 jmc 4115: .It Xo Ic save-buffer
4116: .Op Fl a
1.392 nicm 4117: .Op Fl b Ar buffer-name
1.57 jmc 4118: .Ar path
4119: .Xc
4120: .D1 (alias: Ic saveb )
4121: Save the contents of the specified paste buffer to
4122: .Ar path .
4123: The
4124: .Fl a
4125: option appends to rather than overwriting the file.
4126: .It Xo Ic set-buffer
1.383 nicm 4127: .Op Fl a
1.392 nicm 4128: .Op Fl b Ar buffer-name
4129: .Op Fl n Ar new-buffer-name
1.57 jmc 4130: .Ar data
4131: .Xc
4132: .D1 (alias: Ic setb )
4133: Set the contents of the specified buffer to
4134: .Ar data .
1.383 nicm 4135: The
4136: .Fl a
4137: option appends to rather than overwriting the buffer.
1.392 nicm 4138: The
4139: .Fl n
4140: option renames the buffer to
4141: .Ar new-buffer-name .
1.1 nicm 4142: .It Xo Ic show-buffer
1.392 nicm 4143: .Op Fl b Ar buffer-name
1.1 nicm 4144: .Xc
4145: .D1 (alias: Ic showb )
4146: Display the contents of the specified buffer.
1.57 jmc 4147: .El
4148: .Sh MISCELLANEOUS
4149: Miscellaneous commands are as follows:
4150: .Bl -tag -width Ds
1.72 nicm 4151: .It Ic clock-mode Op Fl t Ar target-pane
1.57 jmc 4152: Display a large clock.
1.334 nicm 4153: .It Xo Ic if-shell
1.410 nicm 4154: .Op Fl bF
1.334 nicm 4155: .Op Fl t Ar target-pane
4156: .Ar shell-command command
4157: .Op Ar command
4158: .Xc
1.57 jmc 4159: .D1 (alias: Ic if )
1.251 nicm 4160: Execute the first
1.57 jmc 4161: .Ar command
4162: if
4163: .Ar shell-command
1.251 nicm 4164: returns success or the second
4165: .Ar command
4166: otherwise.
1.410 nicm 4167: Before being executed,
4168: .Ar shell-command
4169: is expanded using the rules specified in the
1.334 nicm 4170: .Sx FORMATS
4171: section, including those relevant to
4172: .Ar target-pane .
1.335 nicm 4173: With
4174: .Fl b ,
4175: .Ar shell-command
4176: is run in the background.
1.410 nicm 4177: .Pp
4178: If
4179: .Fl F
4180: is given,
4181: .Ar shell-command
4182: is not executed but considered success if neither empty nor zero (after formats
4183: are expanded).
1.57 jmc 4184: .It Ic lock-server
4185: .D1 (alias: Ic lock )
1.90 nicm 4186: Lock each client individually by running the command specified by the
4187: .Ic lock-command
4188: option.
1.308 nicm 4189: .It Xo Ic run-shell
1.357 nicm 4190: .Op Fl b
1.308 nicm 4191: .Op Fl t Ar target-pane
4192: .Ar shell-command
4193: .Xc
1.87 nicm 4194: .D1 (alias: Ic run )
4195: Execute
1.153 nicm 4196: .Ar shell-command
1.106 nicm 4197: in the background without creating a window.
1.334 nicm 4198: Before being executed, shell-command is expanded using the rules specified in
4199: the
4200: .Sx FORMATS
4201: section.
1.335 nicm 4202: With
4203: .Fl b ,
4204: the command is run in the background.
1.308 nicm 4205: After it finishes, any output to stdout is displayed in copy mode (in the pane
4206: specified by
4207: .Fl t
4208: or the current pane if omitted).
1.153 nicm 4209: If the command doesn't return success, the exit status is also displayed.
1.342 nicm 4210: .It Xo Ic wait-for
1.370 nicm 4211: .Op Fl L | S | U
1.342 nicm 4212: .Ar channel
4213: .Xc
4214: .D1 (alias: Ic wait )
1.343 nicm 4215: When used without options, prevents the client from exiting until woken using
1.342 nicm 4216: .Ic wait-for
4217: .Fl S
4218: with the same channel.
1.343 nicm 4219: When
4220: .Fl L
4221: is used, the channel is locked and any clients that try to lock the same
4222: channel are made to wait until the channel is unlocked with
4223: .Ic wait-for
4224: .Fl U .
1.342 nicm 4225: This command only works from outside
4226: .Nm .
1.228 nicm 4227: .El
4228: .Sh TERMINFO EXTENSIONS
4229: .Nm
1.478 nicm 4230: understands some unofficial extensions to
1.228 nicm 4231: .Xr terminfo 5 :
4232: .Bl -tag -width Ds
1.360 nicm 4233: .It Em Cs , Cr
1.233 nicm 4234: Set the cursor colour.
1.232 jmc 4235: The first takes a single string argument and is used to set the colour;
4236: the second takes no arguments and restores the default cursor colour.
4237: If set, a sequence such as this may be used
4238: to change the cursor colour from inside
4239: .Nm :
4240: .Bd -literal -offset indent
4241: $ printf '\e033]12;red\e033\e\e'
4242: .Ed
1.361 jmc 4243: .It Em \&Ss , Se
1.403 nicm 4244: Set or reset the cursor style.
1.232 jmc 4245: If set, a sequence such as this may be used
4246: to change the cursor to an underline:
1.230 nicm 4247: .Bd -literal -offset indent
4248: $ printf '\e033[4 q'
4249: .Ed
4250: .Pp
4251: If
1.403 nicm 4252: .Em Se
4253: is not set, \&Ss with argument 0 will be used to reset the cursor style instead.
1.478 nicm 4254: .It Em \&Tc
4255: Indicate that the terminal supports the
4256: .Ql direct colour
4257: RGB escape sequence (for example, \ee[38;2;255;255;255m).
1.518 nicm 4258: .Pp
4259: If supported, this is used for the OSC initialize colour escape sequence (which
4260: may be enabled by adding the
4261: .Ql initc
4262: and
4263: .Ql ccc
4264: capabilities to the
4265: .Nm
4266: .Xr terminfo 5
4267: entry).
1.232 jmc 4268: .It Em \&Ms
1.478 nicm 4269: Store the current buffer in the host terminal's selection (clipboard).
1.232 jmc 4270: See the
4271: .Em set-clipboard
4272: option above and the
4273: .Xr xterm 1
4274: man page.
1.345 nicm 4275: .El
4276: .Sh CONTROL MODE
4277: .Nm
4278: offers a textual interface called
4279: .Em control mode .
4280: This allows applications to communicate with
4281: .Nm
4282: using a simple text-only protocol.
4283: .Pp
4284: In control mode, a client sends
4285: .Nm
4286: commands or command sequences terminated by newlines on standard input.
4287: Each command will produce one block of output on standard output.
4288: An output block consists of a
4289: .Em %begin
4290: line followed by the output (which may be empty).
4291: The output block ends with a
4292: .Em %end
4293: or
4294: .Em %error .
4295: .Em %begin
4296: and matching
4297: .Em %end
4298: or
4299: .Em %error
4300: have two arguments: an integer time (as seconds from epoch) and command number.
4301: For example:
4302: .Bd -literal -offset indent
4303: %begin 1363006971 2
4304: 0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active)
4305: %end 1363006971 2
4306: .Ed
1.535 nicm 4307: .Pp
4308: The
4309: .Ic refresh-client
4310: .Fl C
4311: command may be used to set the size of a client in control mode.
1.345 nicm 4312: .Pp
4313: In control mode,
4314: .Nm
4315: outputs notifications.
4316: A notification will never occur inside an output block.
4317: .Pp
4318: The following notifications are defined:
4319: .Bl -tag -width Ds
1.547 nicm 4320: .It Ic %client-session-changed Ar client Ar session-id Ar name
4321: The client is now attached to the session with ID
4322: .Ar session-id ,
4323: which is named
4324: .Ar name .
1.345 nicm 4325: .It Ic %exit Op Ar reason
4326: The
4327: .Nm
4328: client is exiting immediately, either because it is not attached to any session
4329: or an error occurred.
4330: If present,
4331: .Ar reason
4332: describes why the client exited.
1.460 nicm 4333: .It Ic %layout-change Ar window-id Ar window-layout Ar window-visible-layout Ar window-flags
1.345 nicm 4334: The layout of a window with ID
4335: .Ar window-id
4336: changed.
4337: The new layout is
4338: .Ar window-layout .
1.460 nicm 4339: The window's visible layout is
4340: .Ar window-visible-layout
4341: and the window flags are
4342: .Ar window-flags .
1.347 nicm 4343: .It Ic %output Ar pane-id Ar value
4344: A window pane produced output.
1.345 nicm 4345: .Ar value
1.350 nicm 4346: escapes non-printable characters and backslash as octal \\xxx.
1.547 nicm 4347: .It Ic %pane-mode-changed Ar pane-id
4348: The pane with ID
4349: .Ar pane-id
4350: has changed mode.
1.345 nicm 4351: .It Ic %session-changed Ar session-id Ar name
4352: The client is now attached to the session with ID
4353: .Ar session-id ,
4354: which is named
4355: .Ar name .
4356: .It Ic %session-renamed Ar name
4357: The current session was renamed to
4358: .Ar name .
1.547 nicm 4359: .It Ic %session-window-changed Ar session-id Ar window-id
4360: The session with ID
4361: .Ar session-id
4362: changed its active window to the window with ID
4363: .Ar window-id .
1.345 nicm 4364: .It Ic %sessions-changed
4365: A session was created or destroyed.
4366: .It Ic %unlinked-window-add Ar window-id
4367: The window with ID
4368: .Ar window-id
4369: was created but is not linked to the current session.
4370: .It Ic %window-add Ar window-id
4371: The window with ID
4372: .Ar window-id
4373: was linked to the current session.
4374: .It Ic %window-close Ar window-id
4375: The window with ID
4376: .Ar window-id
4377: closed.
1.547 nicm 4378: .It Ic %window-pane-changed Ar window-id Ar pane-id
4379: The active pane in the window with ID
4380: .Ar window-id
4381: changed to the pane with ID
4382: .Ar pane-id .
1.345 nicm 4383: .It Ic %window-renamed Ar window-id Ar name
4384: The window with ID
4385: .Ar window-id
4386: was renamed to
4387: .Ar name .
1.1 nicm 4388: .El
4389: .Sh FILES
1.26 nicm 4390: .Bl -tag -width "/etc/tmux.confXXX" -compact
1.1 nicm 4391: .It Pa ~/.tmux.conf
1.6 jmc 4392: Default
1.1 nicm 4393: .Nm
1.6 jmc 4394: configuration file.
1.26 nicm 4395: .It Pa /etc/tmux.conf
4396: System-wide configuration file.
1.1 nicm 4397: .El
1.57 jmc 4398: .Sh EXAMPLES
4399: To create a new
4400: .Nm
4401: session running
4402: .Xr vi 1 :
4403: .Pp
4404: .Dl $ tmux new-session vi
4405: .Pp
4406: Most commands have a shorter form, known as an alias.
4407: For new-session, this is
4408: .Ic new :
4409: .Pp
4410: .Dl $ tmux new vi
4411: .Pp
4412: Alternatively, the shortest unambiguous form of a command is accepted.
4413: If there are several options, they are listed:
4414: .Bd -literal -offset indent
4415: $ tmux n
4416: ambiguous command: n, could be: new-session, new-window, next-window
4417: .Ed
4418: .Pp
4419: Within an active session, a new window may be created by typing
4420: .Ql C-b c
4421: (Ctrl
4422: followed by the
4423: .Ql b
4424: key
4425: followed by the
4426: .Ql c
4427: key).
4428: .Pp
4429: Windows may be navigated with:
4430: .Ql C-b 0
4431: (to select window 0),
4432: .Ql C-b 1
4433: (to select window 1), and so on;
4434: .Ql C-b n
4435: to select the next window; and
4436: .Ql C-b p
4437: to select the previous window.
4438: .Pp
4439: A session may be detached using
4440: .Ql C-b d
1.64 nicm 4441: (or by an external event such as
4442: .Xr ssh 1
4443: disconnection) and reattached with:
1.57 jmc 4444: .Pp
4445: .Dl $ tmux attach-session
4446: .Pp
4447: Typing
4448: .Ql C-b \&?
4449: lists the current key bindings in the current window; up and down may be used
4450: to navigate the list or
4451: .Ql q
4452: to exit from it.
4453: .Pp
4454: Commands to be run when the
4455: .Nm
4456: server is started may be placed in the
4457: .Pa ~/.tmux.conf
4458: configuration file.
4459: Common examples include:
4460: .Pp
4461: Changing the default prefix key:
4462: .Bd -literal -offset indent
4463: set-option -g prefix C-a
4464: unbind-key C-b
4465: bind-key C-a send-prefix
4466: .Ed
4467: .Pp
4468: Turning the status line off, or changing its colour:
4469: .Bd -literal -offset indent
4470: set-option -g status off
1.378 nicm 4471: set-option -g status-style bg=blue
1.57 jmc 4472: .Ed
4473: .Pp
4474: Setting other options, such as the default command,
4475: or locking after 30 minutes of inactivity:
4476: .Bd -literal -offset indent
4477: set-option -g default-command "exec /bin/ksh"
4478: set-option -g lock-after-time 1800
4479: .Ed
4480: .Pp
4481: Creating new key bindings:
4482: .Bd -literal -offset indent
4483: bind-key b set-option status
4484: bind-key / command-prompt "split-window 'exec man %%'"
1.73 nicm 4485: bind-key S command-prompt "new-window -n %1 'ssh %1'"
1.57 jmc 4486: .Ed
1.1 nicm 4487: .Sh SEE ALSO
4488: .Xr pty 4
4489: .Sh AUTHORS
1.477 nicm 4490: .An Nicholas Marriott Aq Mt nicholas.marriott@gmail.com