diff options
Diffstat (limited to 'tmux.1')
-rw-r--r-- | tmux.1 | 216 |
1 files changed, 205 insertions, 11 deletions
@@ -565,6 +565,18 @@ Environment variables may be set by using the syntax for example .Ql HOME=/home/user . Variables set during parsing are added to the global environment. +A hidden variable may be set with +.Ql %hidden , +for example: +.Bd -literal -offset indent +%hidden MYVAR=42 +.Ed +.Pp +Hidden variables are not passed to the environment of processes created +by tmux. +See the +.Sx GLOBAL AND SESSION ENVIRONMENT +section. .Pp Commands may be parsed conditionally by surrounding them with .Ql %if , @@ -1503,9 +1515,11 @@ The following commands are supported in copy mode: .It Li "scroll-up" Ta "C-y" Ta "C-Up" .It Li "search-again" Ta "n" Ta "n" .It Li "search-backward <for>" Ta "?" Ta "" -.It Li "search-forward <for>" Ta "/" Ta "" .It Li "search-backward-incremental <for>" Ta "" Ta "C-r" +.It Li "search-backward-text <for>" Ta "" Ta "" +.It Li "search-forward <for>" Ta "/" Ta "" .It Li "search-forward-incremental <for>" Ta "" Ta "C-s" +.It Li "search-forward-text <for>" Ta "" Ta "" .It Li "search-reverse" Ta "N" Ta "N" .It Li "select-line" Ta "V" Ta "" .It Li "select-word" Ta "" Ta "" @@ -1514,6 +1528,26 @@ The following commands are supported in copy mode: .It Li "top-line" Ta "H" Ta "M-R" .El .Pp +The search commands come in several varieties: +.Ql search-forward +and +.Ql search-backward +search for a regular expression; +the +.Ql -text +variants search for a plain text string rather than a regular expression; +.Ql -incremental +perform an incremental search and expect to be used with the +.Fl i +flag to the +.Ic command-prompt +command. +.Ql search-again +repeats the last search and +.Ql search-reverse +does the same but reverses the direction (forward becomes backward and backward +becomes forward). +.Pp Copy commands may take an optional buffer prefix argument which is used to generate the buffer name (the default is .Ql buffer @@ -1565,7 +1599,7 @@ The synopsis for the command is: .Bl -tag -width Ds .It Xo Ic copy-mode -.Op Fl Meu +.Op Fl eHMqu .Op Fl t Ar target-pane .Xc Enter copy mode. @@ -1575,6 +1609,11 @@ option scrolls one page up. .Fl M begins a mouse drag (only valid if bound to a mouse key binding, see .Sx MOUSE SUPPORT ) . +.Fl H +hides the position indicator in the top right. +.Fl q +cancels copy mode and any other modes. +.Pp .Fl e specifies that scrolling to the bottom of the history (to the visible screen) should exit copy mode. @@ -2234,7 +2273,7 @@ Rename the current window, or the window at if specified, to .Ar new-name . .It Xo Ic resize-pane -.Op Fl DLMRUZ +.Op Fl DLMRTUZ .Op Fl t Ar target-pane .Op Fl x Ar width .Op Fl y Ar height @@ -2273,6 +2312,9 @@ and unzoomed (its normal position in the layout). .Fl M begins mouse resizing (only valid if bound to a mouse key binding, see .Sx MOUSE SUPPORT ) . +.Pp T +trims all lines below the current cursor position and moves lines out of the +history to replace them. .It Xo Ic resize-window .Op Fl aADLRU .Op Fl t Ar target-window @@ -3977,10 +4019,19 @@ The following mouse events are available: .It Li "MouseDown1" Ta "MouseUp1" Ta "MouseDrag1" Ta "MouseDragEnd1" .It Li "MouseDown2" Ta "MouseUp2" Ta "MouseDrag2" Ta "MouseDragEnd2" .It Li "MouseDown3" Ta "MouseUp3" Ta "MouseDrag3" Ta "MouseDragEnd3" +.It Li "SecondClick1" Ta "SecondClick2" Ta "SecondClick3" .It Li "DoubleClick1" Ta "DoubleClick2" Ta "DoubleClick3" .It Li "TripleClick1" Ta "TripleClick2" Ta "TripleClick3" .El .Pp +The +.Ql SecondClick +events are fired for the second click of a double click, even if there may be a +third click which will fire +.Ql TripleClick +instead of +.Ql DoubleClick . +.Pp Each should be suffixed with a location, for example .Ql MouseDown1Status . .Pp @@ -4107,7 +4158,7 @@ specifies an .Xr fnmatch 3 or regular expression comparison. The first argument is the pattern and the second the string to compare. -An optional third argument specifies flags: +An optional argument specifies flags: .Ql r means the pattern is a regular expression instead of the default .Xr fnmatch 3 @@ -4134,6 +4185,38 @@ ignores case. For example: .Ql #{C/r:^Start} .Pp +Numeric operators may be performed by prefixing two comma-separated alternatives with an +.Ql e +and an operator. +An optional +.Ql f +flag may be given after the operator to use floating point numbers, otherwise integers are used. +This may be followed by a number giving the number of decimal places to use for the result. +The available operators are: +addition +.Ql + , +subtraction +.Ql - , +multiplication +.Ql * , +division +.Ql / , +and modulus +.Ql m +or +.Ql % +(note that +.Ql % +must be escaped as +.Ql %% +in formats which are also expanded by +.Xr strftime 3 ) . +For example, +.Ql #{e|*|f|4:5.5,3} +multiplies 5.5 by 3 for a result with four decimal places and +.Ql #{e|%%:7,3} +returns the modulus of 7 and 3. +.Pp A limit may be placed on the length of the resultant string by prefixing it by an .Ql = , @@ -4346,7 +4429,10 @@ The following variables are available, where appropriate: .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 "pid" Ta "" Ta "Server PID" +.It Li "pid" Ta "" Ta "Server PID" +.It Li "popup_key" Ta "" Ta "Key pressed in popup" +.It Li "popup_mouse_x" Ta "" Ta "Mouse X position in popup" +.It Li "popup_mouse_y" Ta "" Ta "Mouse Y position in popup" .It Li "rectangle_toggle" Ta "" Ta "1 if rectangle selection is activated" .It Li "scroll_position" Ta "" Ta "Scroll position in copy mode" .It Li "scroll_region_lower" Ta "" Ta "Bottom of scroll region in pane" @@ -4374,6 +4460,7 @@ The following variables are available, where appropriate: .It Li "session_last_attached" Ta "" Ta "Time session last attached" .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_path" Ta "" Ta "Working directory of session" .It Li "session_stack" Ta "" Ta "Window indexes in most recent order" .It Li "session_windows" Ta "" Ta "Number of windows in session" .It Li "socket_path" Ta "" Ta "Server socket path" @@ -4637,10 +4724,16 @@ from inside, and the variable with the correct terminal setting of .Ql screen . .Pp +Variables in both session and global environments may be marked as hidden. +Hidden variables are not passed into the environment of new processes and +instead can only be used by tmux itself (for example in formats, see the +.Sx FORMATS +section). +.Pp Commands to alter and view the environment are: .Bl -tag -width Ds .It Xo Ic set-environment -.Op Fl gru +.Op Fl hgru .Op Fl t Ar target-session .Ar name Op Ar value .Xc @@ -4657,8 +4750,10 @@ flag unsets a variable. .Fl r indicates the variable is to be removed from the environment before starting a new process. +.Fl h +marks the variable as hidden. .It Xo Ic show-environment -.Op Fl gs +.Op Fl hgs .Op Fl t Ar target-session .Op Ar variable .Xc @@ -4675,6 +4770,8 @@ Variables removed from the environment are prefixed with If .Fl s is used, the output is formatted as a set of Bourne shell commands. +.Fl h +shows hidden variables (omitted by default). .El .Sh STATUS LINE .Nm @@ -4806,7 +4903,7 @@ on the value of the option: .Bl -column "FunctionXXXXXXXXXXXXXXXXXXXXXXXXX" "viXXXX" "emacsX" -offset indent .It Sy "Function" Ta Sy "vi" Ta Sy "emacs" -.It Li "Cancel command prompt" Ta "Escape" Ta "Escape" +.It Li "Cancel command prompt" Ta "q" Ta "Escape" .It Li "Delete from cursor to start of word" Ta "" Ta "C-w" .It Li "Delete entire command" Ta "d" Ta "C-u" .It Li "Delete from cursor to end" Ta "D" Ta "C-k" @@ -4884,6 +4981,7 @@ give the position of the menu. Both may be a row or column number, or one of the following special values: .Bl -column "XXXXX" "XXXX" -offset indent .It Sy "Value" Ta Sy "Flag" Ta Sy "Meaning" +.It Li "C" Ta "Both" Ta "The centre of the terminal" .It Li "R" Ta Fl x Ta "The right side of the terminal" .It Li "P" Ta "Both" Ta "The bottom left of the pane" .It Li "M" Ta "Both" Ta "The mouse position" @@ -4935,6 +5033,97 @@ lists the format variables and their values. .Fl I forwards any input read from stdin to the empty pane given by .Ar target-pane . +.It Xo Ic display-popup +.Op Fl CEK +.Op Fl c Ar target-client +.Op Fl d Ar start-directory +.Op Fl h Ar height +.Op Fl R Ar shell-command +.Op Fl t Ar target-pane +.Op Fl w Ar width +.Op Fl x Ar position +.Op Fl y Ar position +.Op Ar command Ar line Ar ... +.Xc +.D1 (alias: Ic popup ) +Display a popup on +.Ar target-client . +A popup is a rectangular box drawn over the top of any panes. +Panes are not updated while a popup is present. +The popup content may be given in two ways: +.Bl -enum -offset Ds +.It +A set of lines as arguments. +Each line is a format which is expanded using +.Ar target-pane +as the target. +If a line contains newlines it is split into multiple lines. +Lines may use styles, see the +.Sx STYLES +section. +.It +A shell command given by +.Fl R +which is run and any output shown in the pane. +.El +.Pp +The first argument, +.Ar command , +is a +.Nm +command which is run when a key is pressed. +The key is available in the +.Ql popup_key +format. +After +.Ar command +is run, the popup is closed. +It may be empty to discard any key presses. +If +.Fl K +is given together with +.Fl R , +key presses are instead passed to the +.Fl R +shell command. +.Fl E +closes the popup automatically when +.Ar shell-command +exits. +Two +.Fl E +closes the popup only if +.Ar shell-command +exited with success. +With +.Fl K , +.Ql Escape +and +.Ql C-c +close the popup unless +.Fl E +is also given. +.Pp +.Fl x +and +.Fl y +give the position of the popup, they have the same meaning as for the +.Ic display-menu +command. +.Fl w +and +.Fl h +give the width and height - both may be a percentage (followed by +.Ql % ) . +If omitted, without +.Fl R +they are calculated from the given lines and with +.Fl R +they use half the terminal size. +.Pp +The +.Fl C +flag closes any popup on the client. .El .Sh BUFFERS .Nm @@ -5168,8 +5357,9 @@ Lock each client individually by running the command specified by the option. .It Xo Ic run-shell .Op Fl b +.Op Fl d Ar delay .Op Fl t Ar target-pane -.Ar shell-command +.Op Ar shell-command .Xc .D1 (alias: Ic run ) Execute @@ -5182,8 +5372,12 @@ section. With .Fl b , the command is run in the background. -After it finishes, any output to stdout is displayed in copy mode (in the pane -specified by +.Fl d +waits for +.Ar delay +seconds before starting the command. +After the command finishes, any output to stdout is displayed in view mode (in +the pane specified by .Fl t or the current pane if omitted). If the command doesn't return success, the exit status is also displayed. |