diff options
Diffstat (limited to 'tmux.1')
-rw-r--r-- | tmux.1 | 431 |
1 files changed, 239 insertions, 192 deletions
@@ -61,7 +61,7 @@ A window occupies the entire screen and may be split into rectangular panes, each of which is a separate pseudo terminal (the -.Xr pty 4 +.Xr pty 7 manual page documents the technical details of pseudo terminals). Any number of .Nm @@ -168,10 +168,6 @@ server process to recreate it. Behave as a login shell. This flag currently has no effect and is for compatibility with other shells when using tmux as a login shell. -.It Fl q -Set the -.Ic quiet -server option to prevent the server sending various informational messages. .It Fl S Ar socket-path Specify a full alternative path to the server socket. If @@ -255,6 +251,10 @@ Split the current pane into two, left and right. Kill the current window. .It ' Prompt for a window index to select. +.It \&( +Switch the attached client to the previous session. +.It \&) +Switch the attached client to the next session. .It , Rename the current window. .It - @@ -275,6 +275,8 @@ Choose which buffer to paste interactively from a list. List all key bindings. .It D Choose a client to detach. +.It L +Switch the attached client back to the last session. .It \&[ Enter copy mode to copy text or view the history. .It \&] @@ -301,14 +303,14 @@ Briefly display pane indexes. Force redraw of the attached client. .It s Select a new session for the attached client interactively. -.It L -Switch the attached client back to the last session. .It t Show the time. .It w Choose the current window interactively. .It x Kill the current pane. +.It z +Toggle zoom state of the current pane. .It { Swap the current pane with the previous pane. .It } @@ -326,6 +328,8 @@ pane. .It M-1 to M-5 Arrange panes in one of the five preset layouts: even-horizontal, even-vertical, main-horizontal, main-vertical, or tiled. +.It Space +Arrange the current window in the next preset layout. .It M-n Move to the next window with a bell or activity marker. .It M-o @@ -359,7 +363,7 @@ or These specify the client, session, window or pane which a command should affect. .Ar target-client is the name of the -.Xr pty 4 +.Xr pty 7 file to which the client is connected, for example either of .Pa /dev/ttyp1 or @@ -443,10 +447,11 @@ first attempts to use the argument as a pane index; if that fails, it is looked up as for .Ar target-window . A -.Ql + -or +.Ql + , .Ql - -indicate the next or previous pane index, respectively. +or +.Ql \&! +indicate the next, previous or last pane. One of the strings .Em top , .Em bottom , @@ -486,12 +491,37 @@ It may be used alone to target a pane or the window containing it. arguments are .Xr sh 1 commands. -These must be passed as a single item, which typically means quoting them, for -example: +This may be a single argument passed to the shell, for example: .Bd -literal -offset indent new-window 'vi /etc/passwd' .Ed .Pp +Will run: +.Bd -literal -offset indent +/bin/sh -c 'vi /etc/passwd' +.Ed +.Pp +Additionally, the +.Ic new-window , +.Ic new-session , +.Ic split-window , +.Ic respawn-window +and +.Ic respawn-pane +commands allow +.Ar shell-command +to be given as multiple arguments and executed directly (without +.Ql sh -c ) . +This can avoid issues with shell quoting. +For example: +.Bd -literal -offset indent +$ tmux new-window vi /etc/passwd +.Ed +.Pp +Will run +.Xr vi 1 +directly without invoking the shell. +.Pp .Ar command .Op Ar arguments refers to a @@ -710,7 +740,7 @@ and specify the size of the initial window (80 by 24 if not given). .Pp If run from a terminal, any -.Xr termios 4 +.Xr termios 3 special characters are saved and used for new windows in the new session. .Pp The @@ -782,7 +812,7 @@ Show client messages or server information. Any messages displayed on the status line are saved in a per-client message log, up to a maximum of the limit set by the .Ar message-limit -session option for the session attached to that client. +server option. With .Fl t , display the log for @@ -855,10 +885,12 @@ option). The following keys are supported as appropriate for the mode: .Bl -column "FunctionXXXXXXXXXXXXXXXXX" "viXXXXXXXXXX" "emacs" -offset indent .It Sy "Function" Ta Sy "vi" Ta Sy "emacs" +.It Li "Append selection" Ta "A" Ta "" .It Li "Back to indentation" Ta "^" Ta "M-m" .It Li "Bottom of history" Ta "G" Ta "M-<" .It Li "Clear selection" Ta "Escape" Ta "C-g" .It Li "Copy selection" Ta "Enter" Ta "M-w" +.It Li "Copy to named buffer" Ta \&" Ta "" .It Li "Cursor down" Ta "j" Ta "Down" .It Li "Cursor left" Ta "h" Ta "Left" .It Li "Cursor right" Ta "l" Ta "Right" @@ -872,12 +904,12 @@ The following keys are supported as appropriate for the mode: .It Li "Go to line" Ta ":" Ta "g" .It Li "Half page down" Ta "C-d" Ta "M-Down" .It Li "Half page up" Ta "C-u" Ta "M-Up" -.It Li "Jump forward" Ta "f" Ta "f" -.It Li "Jump to forward" Ta "t" Ta "" -.It Li "Jump backward" Ta "F" Ta "F" -.It Li "Jump to backward" Ta "T" Ta "" .It Li "Jump again" Ta ";" Ta ";" .It Li "Jump again in reverse" Ta "," Ta "," +.It Li "Jump backward" Ta "F" Ta "F" +.It Li "Jump forward" Ta "f" Ta "f" +.It Li "Jump to backward" Ta "T" Ta "" +.It Li "Jump to forward" Ta "t" Ta "" .It Li "Next page" Ta "C-f" Ta "Page down" .It Li "Next space" Ta "W" Ta "" .It Li "Next space, end of word" Ta "E" Ta "" @@ -886,8 +918,8 @@ The following keys are supported as appropriate for the mode: .It Li "Other end of selection" Ta "o" Ta "" .It Li "Paste buffer" Ta "p" Ta "C-y" .It Li "Previous page" Ta "C-b" Ta "Page up" -.It Li "Previous word" Ta "b" Ta "M-b" .It Li "Previous space" Ta "B" Ta "" +.It Li "Previous word" Ta "b" Ta "M-b" .It Li "Quit mode" Ta "q" Ta "Escape" .It Li "Rectangle toggle" Ta "v" Ta "R" .It Li "Scroll down" Ta "C-Down or C-e" Ta "C-Down" @@ -896,6 +928,7 @@ The following keys are supported as appropriate for the mode: .It Li "Search again in reverse" Ta "N" Ta "N" .It Li "Search backward" Ta "?" Ta "C-r" .It Li "Search forward" Ta "/" Ta "C-s" +.It Li "Select line" Ta "V" Ta "" .It Li "Start of line" Ta "0" Ta "C-a" .It Li "Start selection" Ta "Space" Ta "C-Space" .It Li "Top of history" Ta "g" Ta "M->" @@ -937,9 +970,6 @@ in emacs mode, and .Ql 10w in vi. .Pp -When copying the selection, the repeat count indicates the buffer index to -replace, if used. -.Pp Mode key bindings are defined in a set of named tables: .Em vi-edit and @@ -1097,7 +1127,7 @@ but a different format may be specified with .Fl F . .It Xo Ic capture-pane .Op Fl aepPq -.Op Fl b Ar buffer-index +.Op Fl b Ar buffer-name .Op Fl E Ar end-line .Op Fl S Ar start-line .Op Fl t Ar target-pane @@ -1132,6 +1162,12 @@ and .Fl E specify the starting and ending line numbers, zero is the first line of the visible pane and negative numbers are lines in the history. +.Ql - +to +.Fl S +is the start of the history and to +.Fl E +the end of the visible pane. The default is to capture only the visible contents of the pane. .It Xo .Ic choose-client @@ -1144,7 +1180,7 @@ interactively from a list. After a client is chosen, .Ql %% is replaced by the client -.Xr pty 4 +.Xr pty 7 path in .Ar template and the result executed as a command. @@ -1158,32 +1194,6 @@ flag, see the section. This command works only if at least one client is attached. .It Xo -.Ic choose-list -.Op Fl l Ar items -.Op Fl t Ar target-window -.Op Ar template -.Xc -Put a window into list choice mode, allowing -.Ar items -to be selected. -.Ar items -can be a comma-separated list to display more than one item. -If an item has spaces, that entry must be quoted. -After an item is chosen, -.Ql %% -is replaced by the chosen item in the -.Ar template -and the result is executed as a command. -If -.Ar template -is not given, "run-shell '%%'" is used. -.Ar items -also accepts format specifiers. -For the meaning of this see the -.Sx FORMATS -section. -This command works only if at least one client is attached. -.It Xo .Ic choose-session .Op Fl F Ar format .Op Fl t Ar target-window @@ -1296,7 +1306,7 @@ flag, see the section. This command works only if at least one client is attached. .It Ic display-panes Op Fl t Ar target-client -.D1 (alias: Ic displayp) +.D1 (alias: Ic displayp ) Display a visible indicator of each pane shown by .Ar target-client . See the @@ -1386,9 +1396,16 @@ The .Fl a option kills all but the window given with .Fl t . -.It Ic last-pane Op Fl t Ar target-window +.It Xo Ic last-pane +.Op Fl de +.Op Fl t Ar target-window +.Xc .D1 (alias: Ic lastp ) Select the last (previously selected) pane. +.Fl e +enables or +.Fl d +disables input to the pane. .It Ic last-window Op Fl t Ar target-session .D1 (alias: Ic last ) Select the last (previously selected) window. @@ -1705,7 +1722,7 @@ and .Ic previous-layout commands. .It Xo Ic select-pane -.Op Fl lDLRU +.Op Fl DdeLlRU .Op Fl t Ar target-pane .Xc .D1 (alias: Ic selectp ) @@ -1725,6 +1742,10 @@ target pane is used. is the same as using the .Ic last-pane command. +.Fl e +enables or +.Fl d +disables input to the pane. .It Xo Ic select-window .Op Fl lnpT .Op Fl t Ar target-window @@ -1748,7 +1769,7 @@ is given and the selected window is already the current window, the command behaves like .Ic last-window . .It Xo Ic split-window -.Op Fl dhvP +.Op Fl bdhvP .Op Fl c Ar start-directory .Oo Fl l .Ar size | @@ -1772,6 +1793,10 @@ and .Fl p options specify the size of the new pane in lines (for vertical split) or in cells (for horizontal split), or as a percentage, respectively. +The +.Fl b +option causes the new pane to be created to the left of or above +.Ar target-pane . All other options have the same meaning as for the .Ic new-window command. @@ -1848,7 +1873,7 @@ In addition, the following special key names are accepted: .Em Escape , .Em F1 to -.Em F20 , +.Em F12 , .Em Home , .Em IC (Insert), @@ -1871,7 +1896,7 @@ Commands related to key bindings are as follows: .Bl -tag -width Ds .It Xo Ic bind-key .Op Fl cnr -.Op Fl t Ar key-table +.Op Fl t Ar mode-table .Ar key Ar command Op Ar arguments .Xc .D1 (alias: Ic bind ) @@ -1900,7 +1925,7 @@ If is present, .Ar key is bound in -.Ar key-table : +.Ar mode-table : the binding for command mode with .Fl c or for normal mode without. @@ -1958,7 +1983,7 @@ Send the prefix key, or with the secondary prefix key, to a window as if it was pressed. .It Xo Ic unbind-key .Op Fl acn -.Op Fl t Ar key-table +.Op Fl t Ar mode-table .Ar key .Xc .D1 (alias: Ic unbind ) @@ -1980,7 +2005,7 @@ If is present, .Ar key in -.Ar key-table +.Ar mode-table is unbound: the binding for command mode with .Fl c or for normal mode without. @@ -2076,9 +2101,7 @@ flag prevents setting an option that is already set. .Pp The .Fl q -flag suppresses the informational message (as if the -.Ic quiet -server option was set). +flag suppresses errors about unknown options. .Pp With .Fl a , @@ -2137,12 +2160,10 @@ passed through to applications running in .Nm . Attached clients should be detached and attached again after changing this option. -.It Xo Ic quiet -.Op Ic on | off -.Xc -Enable or disable the display of various informational messages (see also the -.Fl q -command line flag). +.It Ic message-limit Ar number +Set the number of error or information messages to save in the message log for +each client. +The default is 100. .It Xo Ic set-clipboard .Op Ic on | off .Xc @@ -2165,6 +2186,42 @@ disallowedWindowOps: 20,21,SetXprop Or changing this property from the .Xr xterm 1 interactive menu when required. +.It Ic terminal-overrides Ar string +Contains a list of entries which override terminal descriptions read using +.Xr terminfo 5 . +.Ar string +is a comma-separated list of items each a colon-separated string made up of a +terminal type pattern (matched using +.Xr fnmatch 3 ) +and a set of +.Em name=value +entries. +.Pp +For example, to set the +.Ql clear +.Xr terminfo 5 +entry to +.Ql \ee[H\ee[2J +for all terminal types and the +.Ql dch1 +entry to +.Ql \ee[P +for the +.Ql rxvt +terminal type, the option could be set to the string: +.Bd -literal -offset indent +"*:clear=\ee[H\ee[2J,rxvt:dch1=\ee[P" +.Ed +.Pp +The terminal entry value is passed through +.Xr strunvis 3 +before interpretation. +The default value forcibly corrects the +.Ql colors +entry for terminals which support 256 colours: +.Bd -literal -offset indent +"*256col*:colors=256,xterm*:XT" +.Ed .El .Pp Available session options are: @@ -2358,10 +2415,6 @@ With the flag to the .Ic set-option command the new style is added otherwise the existing style is replaced. -.It Ic message-limit Ar number -Set the number of error or information messages to save in the message log for -each client. -The default is 20. .It Ic message-style Ar style Set status line message style. For how to specify @@ -2392,22 +2445,6 @@ window. .Op Ic on | off .Xc If enabled, request mouse input as UTF-8 on UTF-8 terminals. -.It Ic pane-active-border-style Ar style -Set the pane border style for the currently active pane. -For how to specify -.Ar style , -see the -.Ic message-command-style -option. -Attributes are ignored. -.It Ic pane-border-style Ar style -Set the pane border style for paneas aside from the active pane. -For how to specify -.Ar style , -see the -.Ic message-command-style -option. -Attributes are ignored. .It Ic prefix Ar key Set the key accepted as a prefix key. .It Ic prefix2 Ar key @@ -2540,15 +2577,14 @@ Examples are: #[fg=yellow,bold]#(apm -l)%%#[default] [#S] .Ed .Pp -Where appropriate, special character sequences may be prefixed with a number to -specify the maximum length, for example -.Ql #24T . -.Pp By default, UTF-8 in .Ar string is not interpreted, to enable UTF-8, use the .Ic status-utf8 option. +.Pp +The default is +.Ql "[#S] " . .It Ic status-left-length Ar length Set the maximum .Ar length @@ -2609,42 +2645,6 @@ and .Ic status-right strings as UTF-8; notably, this is important for wide characters. This option defaults to off. -.It Ic terminal-overrides Ar string -Contains a list of entries which override terminal descriptions read using -.Xr terminfo 5 . -.Ar string -is a comma-separated list of items each a colon-separated string made up of a -terminal type pattern (matched using -.Xr fnmatch 3 ) -and a set of -.Em name=value -entries. -.Pp -For example, to set the -.Ql clear -.Xr terminfo 5 -entry to -.Ql \ee[H\ee[2J -for all terminal types and the -.Ql dch1 -entry to -.Ql \ee[P -for the -.Ql rxvt -terminal type, the option could be set to the string: -.Bd -literal -offset indent -"*:clear=\ee[H\ee[2J,rxvt:dch1=\ee[P" -.Ed -.Pp -The terminal entry value is passed through -.Xr strunvis 3 -before interpretation. -The default value forcibly corrects the -.Ql colors -entry for terminals which support 256 colours: -.Bd -literal -offset indent -"*256col*:colors=256,xterm*:XT" -.Ed .It Ic update-environment Ar variables Set a space-separated string containing a list of environment variables to be copied into the session environment when a new session is created or an @@ -2673,15 +2673,6 @@ through to the terminal (which normally makes a sound). Also see the .Ic bell-action option. -.It Xo Ic visual-content -.Op Ic on | off -.Xc -Like -.Ic visual-activity , -display a message when content is present in a window -for which the -.Ic monitor-content -window option is enabled. .It Xo Ic visual-silence .Op Ic on | off .Xc @@ -2863,14 +2854,6 @@ option. Monitor for activity in the window. Windows with activity are highlighted in the status line. .Pp -.It Ic monitor-content Ar match-string -Monitor content in the window. -When -.Xr fnmatch 3 -pattern -.Ar match-string -appears in the window, it is highlighted in the status line. -.Pp .It Xo Ic monitor-silence .Op Ic interval .Xc @@ -2900,11 +2883,29 @@ but set the width of other panes in the .Ic main-vertical layout. .Pp +.It Ic pane-active-border-style Ar style +Set the pane border style for the currently active pane. +For how to specify +.Ar style , +see the +.Ic message-command-style +option. +Attributes are ignored. +.Pp .It Ic pane-base-index Ar index Like .Ic base-index , but set the starting index for pane numbers. .Pp +.It Ic pane-border-style Ar style +Set the pane border style for panes aside from the active pane. +For how to specify +.Ar style , +see the +.Ic message-command-style +option. +Attributes are ignored. +.Pp .It Xo Ic remain-on-exit .Op Ic on | off .Xc @@ -2943,14 +2944,6 @@ see the .Ic message-command-style option. .Pp -.It Ic window-status-content-style Ar style -Set status line style for windows with a content alert. -For how to specify -.Ar style , -see the -.Ic message-command-style -option. -.Pp .It Ic window-status-current-format Ar string Like .Ar window-status-format , @@ -3060,12 +3053,17 @@ and .Ql } , for example .Ql #{session_name} . -Some variables also have an shorter alias such as -.Ql #S . +The possible variables are listed in the table below, or the name of a +.Nm +option may be used for an option's value. +Some variables have a shorter alias such as +.Ql #S , +and .Ql ## is replaced by a single .Ql # . -Conditionals are also accepted by prefixing with +.Pp +Conditionals are available by prefixing with .Ql \&? and separating two alternatives with a comma; if the specified variable exists and is not zero, the first alternative @@ -3076,7 +3074,15 @@ will include the string .Ql attached if the session is attached and the string .Ql not attached -if it is unattached. +if it is unattached, or +.Ql #{?automatic-rename,yes,no} +will include +.Ql yes +if +.Ic automatic-rename +is enabled, or +.Ql no +if not. A limit may be placed on the length of the resultant string by prefixing it by an .Ql = , @@ -3090,7 +3096,7 @@ The following variables are available, where appropriate: .It Li "alternate_on" Ta "" Ta "If pane is in alternate screen" .It Li "alternate_saved_x" Ta "" Ta "Saved cursor X in alternate screen" .It Li "alternate_saved_y" Ta "" Ta "Saved cursor Y in alternate screen" -.It Li "buffer_sample" Ta "" Ta "First 50 characters from buffer" +.It Li "buffer_sample" Ta "" Ta "Sample of start of buffer" .It Li "buffer_size" Ta "" Ta "Size of the specified buffer in bytes" .It Li "client_activity" Ta "" Ta "Integer time client last had activity" .It Li "client_activity_string" Ta "" Ta "String time client last had activity" @@ -3122,49 +3128,56 @@ The following variables are available, where appropriate: .It Li "mouse_standard_flag" Ta "" Ta "Pane mouse standard flag" .It Li "mouse_utf8_flag" Ta "" Ta "Pane mouse UTF-8 flag" .It Li "pane_active" Ta "" Ta "1 if active pane" +.It Li "pane_bottom" Ta "" Ta "Bottom of pane" .It Li "pane_current_command" Ta "" Ta "Current command if available" .It Li "pane_current_path" Ta "" Ta "Current path if available" .It Li "pane_dead" Ta "" Ta "1 if pane is dead" +.It Li "pane_dead_status" Ta "" Ta "Exit status of process in dead pane" .It Li "pane_height" Ta "" Ta "Height of pane" .It Li "pane_id" Ta "#D" Ta "Unique pane ID" .It Li "pane_in_mode" Ta "" Ta "If pane is in a mode" -.It Li "pane_synchronized" Ta "" Ta "If pane is synchronized" +.It Li "pane_input_off" Ta "" Ta "If input to pane is disabled" .It Li "pane_index" Ta "#P" Ta "Index of pane" +.It Li "pane_left" Ta "" Ta "Left of pane" .It Li "pane_pid" Ta "" Ta "PID of first process in pane" +.It Li "pane_right" Ta "" Ta "Right of pane" .It Li "pane_start_command" Ta "" Ta "Command pane started with" -.It Li "pane_start_path" Ta "" Ta "Path pane started with" +.It Li "pane_synchronized" Ta "" Ta "If pane is synchronized" .It Li "pane_tabs" Ta "" Ta "Pane tab positions" .It Li "pane_title" Ta "#T" Ta "Title of pane" +.It Li "pane_top" Ta "" Ta "Top of pane" .It Li "pane_tty" Ta "" Ta "Pseudo terminal of pane" .It Li "pane_width" Ta "" Ta "Width of pane" .It Li "saved_cursor_x" Ta "" Ta "Saved cursor X in pane" .It Li "saved_cursor_y" Ta "" Ta "Saved cursor Y in pane" .It Li "scroll_region_lower" Ta "" Ta "Bottom of scroll region in pane" .It Li "scroll_region_upper" Ta "" Ta "Top of scroll region in pane" -.It Li "session_attached" Ta "" Ta "1 if session attached" +.It Li "session_attached" Ta "" Ta "Number of clients session is attached to" .It Li "session_created" Ta "" Ta "Integer time session created" .It Li "session_created_string" Ta "" Ta "String time session created" .It Li "session_group" Ta "" Ta "Number of session group" .It Li "session_grouped" Ta "" Ta "1 if session in a group" .It Li "session_height" Ta "" Ta "Height of session" .It Li "session_id" Ta "" Ta "Unique session ID" +.It Li "session_many_attached" Ta "" Ta "1 if multiple clients attached" .It Li "session_name" Ta "#S" Ta "Name of session" .It Li "session_width" Ta "" Ta "Width of session" .It Li "session_windows" Ta "" Ta "Number of windows in session" .It Li "window_active" Ta "" Ta "1 if window active" .It Li "window_activity_flag" Ta "" Ta "1 if window has activity alert" .It Li "window_bell_flag" Ta "" Ta "1 if window has bell" -.It Li "window_content_flag" Ta "" Ta "1 if window has content alert" .It Li "window_find_matches" Ta "" Ta "Matched data from the find-window" .It Li "window_flags" Ta "#F" Ta "Window flags" .It Li "window_height" Ta "" Ta "Height of window" .It Li "window_id" Ta "" Ta "Unique window ID" .It Li "window_index" Ta "#I" Ta "Index of window" +.It Li "window_last_flag" Ta "" Ta "1 if window is the last used" .It Li "window_layout" Ta "" Ta "Window layout description" .It Li "window_name" Ta "#W" Ta "Name of window" .It Li "window_panes" Ta "" Ta "Number of panes in window" .It Li "window_silence_flag" Ta "" Ta "1 if window has silence alert" .It Li "window_width" Ta "" Ta "Width of window" +.It Li "window_zoomed_flag" Ta "" Ta "1 if window is zoomed" .It Li "wrap_flag" Ta "" Ta "Pane wrap flag" .El .Sh NAMES AND TITLES @@ -3316,18 +3329,15 @@ The flag is one of the following symbols appended to the window name: .It Li "-" Ta "Marks the last window (previously selected)." .It Li "#" Ta "Window is monitored and activity has been detected." .It Li "!" Ta "A bell has occurred in the window." -.It Li "+" Ta "Window is monitored for content and it has appeared." .It Li "~" Ta "The window has been silent for the monitor-silence interval." .It Li "Z" Ta "The window's active pane is zoomed." .El .Pp The # symbol relates to the .Ic monitor-activity -and + to the -.Ic monitor-content -window options. +window option. The window name is printed in inverted colours if an alert (bell, activity or -content) is present. +silence) is present. .Pp The colour and attributes of the status line may be configured, the entire status line using the @@ -3441,19 +3451,40 @@ is given, otherwise the active pane for the session attached to .El .Sh BUFFERS .Nm -maintains a stack of +maintains a set of named .Em paste buffers . -Up to the value of the +Each buffer may be either explicitly or automatically named. +Explicitly named buffers are named when created with the +.Ic set-buffer +or +.Ic load-buffer +commands, or by renaming an automatically named buffer with +.Ic set-buffer +.Fl n . +Automatically named buffers are given a name such as +.Ql buffer0001 , +.Ql buffer0002 +and so on. +When the .Ic buffer-limit -option are kept; when a new buffer is added, the buffer at the bottom of the -stack is removed. +option is reached, the oldest automatically named buffer is deleted. +Explicitly named are not subject to +.Ic buffer-limit +and may be deleted with +.Ic delete-buffer +command. +.Pp Buffers may be added using .Ic copy-mode or the .Ic set-buffer -command, and pasted into a window using the +and +.Ic load-buffer +commands, and pasted into a window using the .Ic paste-buffer command. +If a buffer command is used and no buffer is specified, the most +recently added automatically named buffer is assumed. .Pp A configurable history buffer is also maintained for each window. By default, up to 2000 lines are kept; this can be altered with the @@ -3474,7 +3505,7 @@ Put a window into buffer choice mode, where a buffer may be chosen interactively from a list. After a buffer is selected, .Ql %% -is replaced by the buffer index in +is replaced by the buffer name in .Ar template and the result executed as a command. If @@ -3489,11 +3520,11 @@ This command works only if at least one client is attached. .It Ic clear-history Op Fl t Ar target-pane .D1 (alias: Ic clearhist ) Remove and free the history for the specified pane. -.It Ic delete-buffer Op Fl b Ar buffer-index +.It Ic delete-buffer Op Fl b Ar buffer-name .D1 (alias: Ic deleteb ) -Delete the buffer at -.Ar buffer-index , -or the top buffer if not specified. +Delete the buffer named +.Ar buffer-name , +or the most recently added automatically named buffer if not specified. .It Xo Ic list-buffers .Op Fl F Ar format .Xc @@ -3505,7 +3536,7 @@ flag, see the .Sx FORMATS section. .It Xo Ic load-buffer -.Op Fl b Ar buffer-index +.Op Fl b Ar buffer-name .Ar path .Xc .D1 (alias: Ic loadb ) @@ -3513,7 +3544,7 @@ Load the contents of the specified paste buffer from .Ar path . .It Xo Ic paste-buffer .Op Fl dpr -.Op Fl b Ar buffer-index +.Op Fl b Ar buffer-name .Op Fl s Ar separator .Op Fl t Ar target-pane .Xc @@ -3522,7 +3553,7 @@ Insert the contents of a paste buffer into the specified pane. If not specified, paste into the current one. With .Fl d , -also delete the paste buffer from the stack. +also delete the paste buffer. When output, any linefeed (LF) characters in the paste buffer are replaced with a separator, by default carriage return (CR). A custom separator may be specified using the @@ -3537,7 +3568,7 @@ is specified, paste bracket control codes are inserted around the buffer if the application has requested bracketed paste mode. .It Xo Ic save-buffer .Op Fl a -.Op Fl b Ar buffer-index +.Op Fl b Ar buffer-name .Ar path .Xc .D1 (alias: Ic saveb ) @@ -3547,14 +3578,23 @@ The .Fl a option appends to rather than overwriting the file. .It Xo Ic set-buffer -.Op Fl b Ar buffer-index +.Op Fl a +.Op Fl b Ar buffer-name +.Op Fl n Ar new-buffer-name .Ar data .Xc .D1 (alias: Ic setb ) Set the contents of the specified buffer to .Ar data . +The +.Fl a +option appends to rather than overwriting the buffer. +The +.Fl n +option renames the buffer to +.Ar new-buffer-name . .It Xo Ic show-buffer -.Op Fl b Ar buffer-index +.Op Fl b Ar buffer-name .Xc .D1 (alias: Ic showb ) Display the contents of the specified buffer. @@ -3565,7 +3605,7 @@ Miscellaneous commands are as follows: .It Ic clock-mode Op Fl t Ar target-pane Display a large clock. .It Xo Ic if-shell -.Op Fl b +.Op Fl bF .Op Fl t Ar target-pane .Ar shell-command command .Op Ar command @@ -3578,7 +3618,9 @@ if returns success or the second .Ar command otherwise. -Before being executed, shell-command is expanded using the rules specified in the +Before being executed, +.Ar shell-command +is expanded using the rules specified in the .Sx FORMATS section, including those relevant to .Ar target-pane . @@ -3586,6 +3628,13 @@ With .Fl b , .Ar shell-command is run in the background. +.Pp +If +.Fl F +is given, +.Ar shell-command +is not executed but considered success if neither empty nor zero (after formats +are expanded). .It Ic lock-server .D1 (alias: Ic lock ) Lock each client individually by running the command specified by the @@ -3646,7 +3695,7 @@ to change the cursor colour from inside $ printf '\e033]12;red\e033\e\e' .Ed .It Em \&Ss , Se -Change the cursor style. +Set or reset the cursor style. If set, a sequence such as this may be used to change the cursor to an underline: .Bd -literal -offset indent @@ -3654,10 +3703,8 @@ $ printf '\e033[4 q' .Ed .Pp If -.Em Csr -is set, it will be used to reset the cursor style instead -of -.Em Cs . +.Em Se +is not set, \&Ss with argument 0 will be used to reset the cursor style instead. .It Em \&Ms This sequence can be used by .Nm @@ -3852,6 +3899,6 @@ bind-key / command-prompt "split-window 'exec man %%'" bind-key S command-prompt "new-window -n %1 'ssh %1'" .Ed .Sh SEE ALSO -.Xr pty 4 +.Xr pty 7 .Sh AUTHORS .An Nicholas Marriott Aq Mt nicm@users.sourceforge.net |