diff options
Diffstat (limited to 'tmux.1')
-rw-r--r-- | tmux.1 | 111 |
1 files changed, 98 insertions, 13 deletions
@@ -1096,6 +1096,14 @@ Switch the current session for client .Ar target-client to .Ar target-session . +As a special case, +.Fl t +may refer to a pane (a target that contains +.Ql : , +.Ql . +or +.Ql % ) +in which case the session, window and pane are all changed. If .Fl l , .Fl n @@ -1175,12 +1183,14 @@ The following commands are supported in copy mode: .It Li "bottom-line" Ta "L" Ta "" .It Li "cancel" Ta "q" Ta "Escape" .It Li "clear-selection" Ta "Escape" Ta "C-g" -.It Li "copy-end-of-line" Ta "D" Ta "C-k" -.It Li "copy-line" Ta "" Ta "" -.It Li "copy-pipe <command>" Ta "" Ta "" -.It Li "copy-pipe-and-cancel <command>" Ta "" Ta "" -.It Li "copy-selection" Ta "" Ta "" -.It Li "copy-selection-and-cancel" Ta "Enter" Ta "M-w" +.It Li "copy-end-of-line [<prefix>]" Ta "D" Ta "C-k" +.It Li "copy-line [<prefix>]" Ta "" Ta "" +.It Li "copy-pipe <command> [<prefix>]" Ta "" Ta "" +.It Li "copy-pipe-no-clear <command> [<prefix>]" Ta "" Ta "" +.It Li "copy-pipe-and-cancel <command> [<prefix>]" Ta "" Ta "" +.It Li "copy-selection [<prefix>]" Ta "" Ta "" +.It Li "copy-selection-no-clear [<prefix>]" Ta "" Ta "" +.It Li "copy-selection-and-cancel [<prefix>]" Ta "Enter" Ta "M-w" .It Li "cursor-down" Ta "j" Ta "Down" .It Li "cursor-left" Ta "h" Ta "Left" .It Li "cursor-right" Ta "l" Ta "Right" @@ -1222,15 +1232,27 @@ The following commands are supported in copy mode: .It Li "search-forward-incremental <for>" Ta "" Ta "C-s" .It Li "search-reverse" Ta "N" Ta "N" .It Li "select-line" Ta "V" Ta "" +.It Li "select-word" Ta "" Ta "" .It Li "start-of-line" Ta "0" Ta "C-a" .It Li "stop-selection" Ta "" Ta "" .It Li "top-line" Ta "H" Ta "M-R" .El .Pp +Copy commands may take an optional buffer prefix argument which is used +to generate the buffer name (the default is +.Ql buffer +so buffers are named +.Ql buffer0 , +.Ql buffer1 +and so on). +Pipe commands take a command argument which is the command to which the +copied text is piped. The .Ql -and-cancel variants of some commands exit copy mode after they have completed (for copy commands) or when the cursor reaches the bottom (for scrolling commands). +.Ql -no-clear +variants do not clear the selection. .Pp The next and previous word keys use space and the .Ql - , @@ -1805,6 +1827,7 @@ option. .It Xo Ic new-window .Op Fl adkP .Op Fl c Ar start-directory +.Op Fl e Ar environment .Op Fl F Ar format .Op Fl n Ar window-name .Op Fl t Ar target-window @@ -1844,6 +1867,12 @@ See the .Ic remain-on-exit option to change this behaviour. .Pp +.Fl e +takes the form +.Ql VARIABLE=value +and sets an environment variable for the newly created window; it may be +specified multiple times. +.Pp The .Ev TERM environment variable must be set to @@ -1856,7 +1885,9 @@ for all programs running New windows will automatically have .Ql TERM=screen added to their environment, but care must be taken not to reset this in shell -start-up files. +start-up files or by the +.Fl e +option. .Pp The .Fl P @@ -2015,8 +2046,9 @@ This command will automatically set .Ic window-size to manual in the window options. .It Xo Ic respawn-pane -.Op Fl c Ar start-directory .Op Fl k +.Op Fl c Ar start-directory +.Op Fl e Ar environment .Op Fl t Ar target-pane .Op Ar shell-command .Xc @@ -2032,9 +2064,15 @@ The pane must be already inactive, unless is given, in which case any existing command is killed. .Fl c specifies a new working directory for the pane. +The +.Fl e +option has the same meaning as for the +.Ic new-window +command. .It Xo Ic respawn-window -.Op Fl c Ar start-directory .Op Fl k +.Op Fl c Ar start-directory +.Op Fl e Ar environment .Op Fl t Ar target-window .Op Ar shell-command .Xc @@ -2050,6 +2088,11 @@ The window must be already inactive, unless is given, in which case any existing command is killed. .Fl c specifies a new working directory for the window. +The +.Fl e +option has the same meaning as for the +.Ic new-window +command. .It Xo Ic rotate-window .Op Fl DU .Op Fl t Ar target-window @@ -2168,6 +2211,7 @@ the command behaves like .It Xo Ic split-window .Op Fl bdfhvP .Op Fl c Ar start-directory +.Op Fl e Ar environment .Oo Fl l .Ar size | .Fl p Ar percentage Oc @@ -2513,9 +2557,17 @@ command), a server option with .Fl s , otherwise a session option. +If the option is not a user option, +.Fl w +and +.Fl s +are unnecessary - +.Nm +will infer the type from the option name. If .Fl g is given, the global session or window option is set. +.Pp .Fl F expands formats in the option value. The @@ -3431,7 +3483,7 @@ function key sequences; these have a number included to indicate modifiers such as Shift, Alt or Ctrl. .El .It Xo Ic show-options -.Op Fl gqsvw +.Op Fl gHqsvw .Op Fl t Ar target-session | Ar target-window .Op Ar option .Xc @@ -3444,6 +3496,15 @@ the server options with .Fl s , otherwise the session options for .Ar target session . +If +.Ar option +is given and is not a user option, +.Fl w +and +.Fl s +are unnecessary - +.Nm +will infer the type from the option name. Global session or window options are listed if .Fl g is used. @@ -3454,6 +3515,8 @@ If is set, no error will be returned if .Ar option is unset. +.Fl H +includes hooks (omitted by default). .It Xo Ic show-window-options .Op Fl gv .Op Fl t Ar target-window @@ -3478,6 +3541,26 @@ commands have an .Em after hook and there are a number of hooks not associated with commands. .Pp +Hooks are stored as array options, members of the array are executed in +order when the hook is triggered. +Hooks may be configured with the +.Ic set-hook +or +.Ic set-option +commands and displayed with +.Ic show-hooks +or +.Ic show-options +.Fl H . +The following two commands are equivalent: +.Bd -literal -offset indent. +set-hook -g pane-mode-changed[42] 'set -g status-left-style bg=red' +set-option -g pane-mode-changed[42] 'set -g status-left-style bg=red' +.Ed +.Pp +Setting a hook without specifying an array index clears the hook and sets the +first member of the array. +.Pp A command's after hook is run after it completes, except when the command is run as part of a hook itself. @@ -3488,7 +3571,7 @@ For example, the following command adds a hook to select the even-vertical layout after every .Ic split-window : .Bd -literal -offset indent -set-hook after-split-window "selectl even-vertical" +set-hook -g after-split-window "selectl even-vertical" .Ed .Pp All the notifications listed in the @@ -3552,7 +3635,7 @@ Run when a window is unlinked from a session. Hooks are managed with these commands: .Bl -tag -width Ds .It Xo Ic set-hook -.Op Fl gRu +.Op Fl agRu .Op Fl t Ar target-session .Ar hook-name .Ar command @@ -3574,6 +3657,8 @@ hooks (for .Ar target-session with .Fl t ) . +.Fl a +appends to a hook. Like options, session hooks inherit from the global ones. .Pp With @@ -3975,7 +4060,7 @@ In addition, embedded styles may be specified in format options, such as by enclosing them in .Ql #[ and -.Ql ] . +.Ql \&] . .Pp A style may be the single term .Ql default |