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