From 9d83c5e94827db0248226149cffee23296c851aa Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 3 Nov 2020 08:09:35 +0000 Subject: Expand menu and popup -x and -y as a format, from teo_paul1 at yahoo dot com in GitHub issue 2442. --- tmux.1 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 3d58b32f..0a71cc37 100644 --- a/tmux.1 +++ b/tmux.1 @@ -5388,6 +5388,28 @@ Both may be a row or column number, or one of the following special values: .It Li "S" Ta Fl y Ta "The line above or below the status line" .El .Pp +Or a format, which is expanded including the following additional variables: +.Bl -column "XXXXXXXXXXXXXXXXXXXXXXXXXX" -offset indent +.It Sy "Variable name" Ta Sy "Replaced with" +.It Li "popup_centre_x" Ta "Centered in the client" +.It Li "popup_centre_y" Ta "Centered in the client" +.It Li "popup_height" Ta "Height of menu or popup" +.It Li "popup_mouse_bottom" Ta "Bottom of at the mouse" +.It Li "popup_mouse_centre_x" Ta "Horizontal centre at the mouse" +.It Li "popup_mouse_centre_y" Ta "Vertical centre at the mouse" +.It Li "popup_mouse_top" Ta "Top at the mouse" +.It Li "popup_mouse_x" Ta "Mouse X position" +.It Li "popup_mouse_y" Ta "Mouse Y position" +.It Li "popup_pane_bottom" Ta "Bottom of the pane" +.It Li "popup_pane_left" Ta "Left of the pane" +.It Li "popup_pane_right" Ta "Right of the pane" +.It Li "popup_pane_top" Ta "Top of the pane" +.It Li "popup_status_line_y" Ta "Above or below the status line" +.It Li "popup_width" Ta "Width of menu or popup" +.It Li "popup_window_status_line_x" Ta "At the window position in status line" +.It Li "popup_window_status_line_y" Ta "At the status line showing the window" +.El +.Pp Each menu consists of items followed by a key shortcut shown in brackets. If the menu is too large to fit on the terminal, it is not displayed. Pressing the key shortcut chooses the corresponding item. -- cgit From 61e55fa50dc7119a8c88bb385e615a8e6c8d6a85 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 9 Nov 2020 09:10:10 +0000 Subject: Change how escaping is processed for formats so that ## and # can be used in styles. Also add a 'w' format modifier for the width. From Chas J Owens IV in GitHub issue 2389. --- tmux.1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 0a71cc37..37f6f165 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4591,7 +4591,9 @@ pads the string to a given width, for example will result in a width of at least 10 characters. A positive width pads on the left, a negative on the right. .Ql n -expands to the length of the variable, for example +expands to the length of the variable and +.Ql w +to its width when displayed, for example .Ql #{n:window_name} . .Pp Prefixing a time variable with -- cgit From 76cfb5f471ac785b133cdfd6ec53a5097c0bdf3c Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 26 Nov 2020 09:19:10 +0000 Subject: Add -N flag to display-panes to ignore keys, GitHub issue 2473. --- tmux.1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 37f6f165..4cc4bfe4 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2098,7 +2098,7 @@ starts without the option information. This command works only if at least one client is attached. .It Xo .Ic display-panes -.Op Fl b +.Op Fl bN .Op Fl d Ar duration .Op Fl t Ar target-client .Op Ar template @@ -2111,7 +2111,8 @@ See the and .Ic display-panes-active-colour session options. -The indicator is closed when a key is pressed or +The indicator is closed when a key is pressed (unless +.Fl N is given) or .Ar duration milliseconds have passed. If -- cgit From 33046ecee2090a7ff733097d1c05d377936b3e5f Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 30 Nov 2020 13:37:45 +0000 Subject: Ignore running command when checking for no-hooks flag if it is blocked. GitHub issue 2483. --- tmux.1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 4cc4bfe4..b3a74b0a 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2112,7 +2112,8 @@ and .Ic display-panes-active-colour session options. The indicator is closed when a key is pressed (unless -.Fl N is given) or +.Fl N +is given) or .Ar duration milliseconds have passed. If -- cgit From 9a74bba007a60b93d1fdf68772e5cfb61b3558ff Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 1 Dec 2020 08:12:58 +0000 Subject: Make replacement of ##s consistent when drawing formats, whether followed by [ or not. Add a flag (e) to the q: format modifier to double up #s and use it for the window_flags format variable so it doesn't end up escaping any following text. GitHub issue 2485. --- tmux.1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index b3a74b0a..9d1021f3 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4638,7 +4638,12 @@ of the variable respectively. .Ql q:\& will escape .Xr sh 1 -special characters. +special characters or with an +.Ql e +suffix, escape hash characters (so +.Ql # +becomes +.Ql ## ). .Ql E:\& will expand the format twice, for example .Ql #{E:status-left} -- cgit From fd451aa7962f399250fd166f207451fcf4b9cb94 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 3 Dec 2020 07:12:11 +0000 Subject: Redraw any visible modes when status line changes so that formats like the pane title are updated. GitHub issue 2487. Also a man page fix from jmc. --- tmux.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 9d1021f3..f9a9cdf3 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4643,7 +4643,7 @@ special characters or with an suffix, escape hash characters (so .Ql # becomes -.Ql ## ). +.Ql ## ) . .Ql E:\& will expand the format twice, for example .Ql #{E:status-left} -- cgit From 8bd29a30bff4e9d50765e2168a7aad11e163ccde Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 15 Dec 2020 08:31:50 +0000 Subject: Make synchronize-panes a pane option and add -U flag to set-option to unset an option on all panes. GitHub issue 2491 from Rostislav Nesin. --- tmux.1 | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index f9a9cdf3..344f3b72 100644 --- a/tmux.1 +++ b/tmux.1 @@ -3136,7 +3136,7 @@ abc123 Commands which set options are as follows: .Bl -tag -width Ds .It Xo Ic set-option -.Op Fl aFgopqsuw +.Op Fl aFgopqsuUw .Op Fl t Ar target-pane .Ar option Ar value .Xc @@ -3169,6 +3169,11 @@ flag unsets an option, so a session inherits the option from the global options (or with .Fl g , restores a global option to the default). +.Fl U +unsets an option (like +.Fl u ) +but if the option is a pane option also unsets the option on any panes in the +window. .Ar value depends on the option and may be a number, a string, or a flag (on, off, or omitted to toggle). @@ -4062,12 +4067,6 @@ see the section. Attributes are ignored. .Pp -.It Xo Ic synchronize-panes -.Op Ic on | off -.Xc -Duplicate input to any pane to all other panes in the same window (only -for panes that are not in any special mode). -.Pp .It Ic window-status-activity-style Ar style Set status line style for windows with an activity alert. For how to specify @@ -4190,6 +4189,12 @@ The pane may be reactivated with the .Ic respawn-pane command. .Pp +.It Xo Ic synchronize-panes +.Op Ic on | off +.Xc +Duplicate input to all other panes in the same window where this option is also +on (only for panes that are not in any mode). +.Pp .It Ic window-active-style Ar style Set the pane style when it is the active pane. For how to specify -- cgit From 606bd5f8c6be326ea2e4746de5d5e007fd04eef8 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 1 Jan 2021 08:36:51 +0000 Subject: Add a -C flag to run-shell to use a tmux command rather than a shell command. --- tmux.1 | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 344f3b72..1376df95 100644 --- a/tmux.1 +++ b/tmux.1 @@ -5827,7 +5827,7 @@ Lock each client individually by running the command specified by the .Ic lock-command option. .It Xo Ic run-shell -.Op Fl b +.Op Fl bC .Op Fl d Ar delay .Op Fl t Ar target-pane .Op Ar shell-command @@ -5835,9 +5835,14 @@ option. .D1 (alias: Ic run ) Execute .Ar shell-command -in the background without creating a window. -Before being executed, shell-command is expanded using the rules specified in -the +or (with +.Fl C ) +a +.Nm +command in the background without creating a window. +Before being executed, +.Ar shell-command +is expanded using the rules specified in the .Sx FORMATS section. With @@ -5847,11 +5852,13 @@ the command is run in the background. 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 +If +.Fl C +is not given, 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. +or the current pane if omitted) after the command finishes. +If the command fails, the exit status is also displayed. .It Xo Ic wait-for .Op Fl L | S | U .Ar channel -- cgit From bd0fb22f0a206a73ec3f41322571d56d9d7d7c5d Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 4 Jan 2021 08:43:16 +0000 Subject: Add a variant of remain-on-exit that only keeps the pane if the program failed, GitHub issue 2513. --- tmux.1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 1376df95..941305e3 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4181,10 +4181,13 @@ interactive application starts and restores it on exit, so that any output visible before the application starts reappears unchanged after it exits. .Pp .It Xo Ic remain-on-exit -.Op Ic on | off +.Op Ic on | off | failed .Xc A pane with this flag set is not destroyed when the program running in it exits. +If set to +.Ic failed , +then only when the program exit status is not zero. The pane may be reactivated with the .Ic respawn-pane command. -- cgit From 71c590a37f98d82c72279eddae74f9b8be146202 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 17 Jan 2021 16:17:41 +0000 Subject: Add -N flag to never start server even if command would normally do so, GitHub issue 2523. --- tmux.1 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 941305e3..93842482 100644 --- a/tmux.1 +++ b/tmux.1 @@ -191,6 +191,11 @@ directories are missing). 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 N +Do not start the server even if the command would normally do so (for example +.Ic new-session +or +.Ic start-server ) . .It Fl S Ar socket-path Specify a full alternative path to the server socket. If -- cgit From fb774b77d0f5ccb988b508b8a794633d4c9a5962 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 20 Jan 2021 07:16:54 +0000 Subject: Change so that window_flags escapes # automatically which means configs will not have to change. A new format window_raw_flags contains the old unescaped version. --- tmux.1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 93842482..8c812f38 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4651,8 +4651,8 @@ of the variable respectively. .Ql q:\& will escape .Xr sh 1 -special characters or with an -.Ql e +special characters or with a +.Ql h suffix, escape hash characters (so .Ql # becomes @@ -4882,7 +4882,8 @@ The following variables are available, where appropriate: .It Li "window_cell_height" Ta "" Ta "Height of each cell in pixels" .It Li "window_cell_width" Ta "" Ta "Width of each cell in pixels" .It Li "window_end_flag" Ta "" Ta "1 if window has the highest index" -.It Li "window_flags" Ta "#F" Ta "Window flags" +.It Li "window_flags" Ta "#F" Ta "Window flags with # escaped as ##" +.It Li "window_raw_flags" Ta "" Ta "Window flags with nothing escaped" .It Li "window_format" Ta "" Ta "1 if format is for a window" .It Li "window_height" Ta "" Ta "Height of window" .It Li "window_id" Ta "" Ta "Unique window ID" -- cgit From bba71f696f49cdd3f70eaea12fd3a34c407a5aa3 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 22 Jan 2021 10:24:52 +0000 Subject: Add rectangle-on and rectangle-off copy mode commands, GitHub isse 2546 from author at will dot party. --- tmux.1 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 8c812f38..160e6a92 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1657,6 +1657,8 @@ The following commands are supported in copy mode: .It Li "previous-paragraph" Ta "{" Ta "M-{" .It Li "previous-space" Ta "B" Ta "" .It Li "previous-word" Ta "b" Ta "M-b" +.It Li "rectangle-on" Ta "" Ta "" +.It Li "rectangle-off" Ta "" Ta "" .It Li "rectangle-toggle" Ta "v" Ta "R" .It Li "refresh-from-pane" Ta "r" Ta "r" .It Li "scroll-down" Ta "C-e" Ta "C-Down" -- cgit From 255802d8d7357bf985bf2e4221eac8ab64b348ea Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 29 Jan 2021 09:48:43 +0000 Subject: Trim output overwritten by later text or clears completely rather than only in a few cases. This means we can better track when a line should wrap. GitHub issue 2537. --- tmux.1 | 2 -- 1 file changed, 2 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 160e6a92..247f0fb6 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4823,7 +4823,6 @@ The following variables are available, where appropriate: .It Li "pane_pipe" Ta "" Ta "1 if pane is being piped" .It Li "pane_right" Ta "" Ta "Right of pane" .It Li "pane_search_string" Ta "" Ta "Last search string in copy mode" -.It Li "pane_skipped" Ta "" Ta "Bytes skipped as not visible in pane" .It Li "pane_start_command" Ta "" Ta "Command pane started with" .It Li "pane_synchronized" Ta "" Ta "1 if pane is synchronized" .It Li "pane_tabs" Ta "" Ta "Pane tab positions" @@ -4831,7 +4830,6 @@ 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 "pane_written" Ta "" Ta "Bytes written by pane (aside from redrawing)" .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" -- cgit From 509221520c87510016f5c90aeea0d4dcc4b74a98 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 1 Feb 2021 08:01:14 +0000 Subject: Add a no-detached choice to detach-on-destroy which detaches only if there are no other detached sessions to switch to, from Sencer Selcuk in GitHub issue 2553. --- tmux.1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 247f0fb6..12d555e5 100644 --- a/tmux.1 +++ b/tmux.1 @@ -3575,12 +3575,16 @@ The default is 80x24. If enabled and the session is no longer attached to any clients, it is destroyed. .It Xo Ic detach-on-destroy -.Op Ic on | off +.Op Ic off | on | no-detached .Xc If on (the default), the client is detached when the session it is attached to is destroyed. If off, the client is switched to the most recently active of the remaining sessions. +If +.Ic no-detached , +the client is detached only if there are no detached sessions; if detached +sessions exist, the client is switched to the most recently active. .It Ic display-panes-active-colour Ar colour Set the colour used by the .Ic display-panes -- cgit From 5c48086e5c8e4ea9633fd6b913d33dcc2b47f2d7 Mon Sep 17 00:00:00 2001 From: jmc Date: Tue, 2 Feb 2021 07:33:29 +0000 Subject: article fixes; from eddie youseph --- tmux.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 12d555e5..c076f0cb 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1362,7 +1362,7 @@ a pane ID such as .Ql %0 ; .Ql %* for all panes in the attached session; -an window ID such as +a window ID such as .Ql @0 ; or .Ql @* -- cgit From be471c328ea0ae04026e4ff32fda7b7f11c74255 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 5 Feb 2021 12:23:49 +0000 Subject: Add a -S flag to new-window to make it select the existing window if one with the given name already exists rather than failing with an error. Also add a format to check if a window or session name exists which allows the same with other commands. Requested by and discussed with kn@. --- tmux.1 | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index c076f0cb..530cd559 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2348,7 +2348,7 @@ the .Ic base-index option. .It Xo Ic new-window -.Op Fl abdkP +.Op Fl abdkPS .Op Fl c Ar start-directory .Op Fl e Ar environment .Op Fl F Ar format @@ -2377,6 +2377,14 @@ represents the window to be created; if the target already exists an error is shown, unless the .Fl k flag is used, in which case it is destroyed. +If +.Fl S +is given and a window named +.Ar window-name +already exists, it is selected (unless +.Fl d +is also given in which case the command does nothing). +.Pp .Ar shell-command is the command to execute. If @@ -4688,6 +4696,17 @@ For example, to get a list of windows formatted like the status line: #{W:#{E:window-status-format} ,#{E:window-status-current-format} } .Ed .Pp +.Ql N:\& +checks if a window (without any suffix or with the +.Ql w +suffix) or a session (with the +.Ql s +suffix) name exists, for example +.Ql `N/w:foo` +is replaced with 1 if a window named +.Ql foo +exists. +.Pp A prefix of the form .Ql s/foo/bar/:\& will substitute -- cgit From 3dddc11603b1bd66b5586b47795716e87921a096 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 5 Feb 2021 12:29:18 +0000 Subject: Send Unicode directional isolate characters around horizontal pane borders if the terminal support UTF-8 and an extension terminfo(5) capability "Bidi" is present. On terminals with BiDi support (ie, VTE) this seems to be enough to display right-to-left text acceptably enough to be usable (with some caveats about the mouse position). Requested by and with help from Mahmoud Elagdar in GitHub issue 2425. --- tmux.1 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 530cd559..090b9436 100644 --- a/tmux.1 +++ b/tmux.1 @@ -5953,6 +5953,10 @@ option should be used. An existing extension that tells .Nm the terminal supports default colours. +.It Em \&Bidi +Tell +.Nm +that the terminal supports the VTE bidirectional text extensions. .It Em \&Cs , Cr Set the cursor colour. The first takes a single string argument and is used to set the colour; -- cgit From 1e29ebd41289543897b73354e97c654641a4e079 Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 6 Feb 2021 13:02:52 +0000 Subject: In the end UTF-8 did not become a terminal feature, should not be listed in man page. --- tmux.1 | 2 -- 1 file changed, 2 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 090b9436..85b3ee45 100644 --- a/tmux.1 +++ b/tmux.1 @@ -3458,8 +3458,6 @@ Supports title setting. .It usstyle Allows underscore style and colour to be set. -.It UTF-8 -Is able to handle UTF-8 output. .El .It Ic terminal-overrides[] Ar string Allow terminal descriptions read using -- cgit From e3005e5ec4385d284abdeb3cecafc69c14655649 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 8 Feb 2021 14:46:53 +0000 Subject: Add "pipe" variants of the "copy-pipe" commands which do not copy, from Christian Zangl. --- tmux.1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 85b3ee45..775d0e28 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1653,6 +1653,9 @@ The following commands are supported in copy mode: .It Li "page-down" Ta "C-f" Ta "PageDown" .It Li "page-down-and-cancel" Ta "" Ta "" .It Li "page-up" Ta "C-b" Ta "PageUp" +.It Li "pipe [] []" Ta "" Ta "" +.It Li "pipe-no-clear [] []" Ta "" Ta "" +.It Li "pipe-and-cancel [] []" Ta "" Ta "" .It Li "previous-matching-bracket" Ta "" Ta "M-C-b" .It Li "previous-paragraph" Ta "{" Ta "M-{" .It Li "previous-space" Ta "B" Ta "" @@ -1708,7 +1711,9 @@ so buffers are named .Ql buffer1 and so on). Pipe commands take a command argument which is the command to which the -copied text is piped. +selected text is piped. +.Ql copy-pipe +variants also copy the selection. The .Ql -and-cancel variants of some commands exit copy mode after they have completed (for copy -- cgit From 32186950f5ae3e3517f39b2723cc247a9da93d8c Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 10 Feb 2021 07:17:07 +0000 Subject: Use ~/.tmux.conf as an example rather than /etc/passwd, suggested by deraadt@. --- tmux.1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 775d0e28..e1891009 100644 --- a/tmux.1 +++ b/tmux.1 @@ -872,12 +872,12 @@ arguments are commands. This may be a single argument passed to the shell, for example: .Bd -literal -offset indent -new-window 'vi /etc/passwd' +new-window 'vi ~/.tmux.conf' .Ed .Pp Will run: .Bd -literal -offset indent -/bin/sh -c 'vi /etc/passwd' +/bin/sh -c 'vi ~/.tmux.conf' .Ed .Pp Additionally, the @@ -894,7 +894,7 @@ to be given as multiple arguments and executed directly (without This can avoid issues with shell quoting. For example: .Bd -literal -offset indent -$ tmux new-window vi /etc/passwd +$ tmux new-window vi ~/.tmux.conf .Ed .Pp Will run @@ -940,7 +940,7 @@ $ tmux kill-window -t :1 $ tmux new-window \e; split-window -d -$ tmux new-session -d 'vi /etc/passwd' \e; split-window -d \e; attach +$ tmux new-session -d 'vi ~/.tmux.conf' \e; split-window -d \e; attach .Ed .Sh CLIENTS AND SESSIONS The -- cgit From 6642706f7baab2d7501ca8ac16659ddab1d729ca Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 15 Feb 2021 09:39:37 +0000 Subject: Support X11 colour names and some other variations for OSC 10/11, also add OSC 110 and 111. GitHub issue 2567. --- tmux.1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index e1891009..9150c4a6 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4778,9 +4778,9 @@ The following variables are available, where appropriate: .It Li "client_prefix" Ta "" Ta "1 if prefix key has been pressed" .It Li "client_readonly" Ta "" Ta "1 if client is readonly" .It Li "client_session" Ta "" Ta "Name of the client's session" +.It Li "client_termfeatures" Ta "" Ta "Terminal features of client, if any" .It Li "client_termname" Ta "" Ta "Terminal name of client" .It Li "client_termtype" Ta "" Ta "Terminal type of client, if available" -.It Li "client_termfeatures" Ta "" Ta "Terminal features of client, if any" .It Li "client_tty" Ta "" Ta "Pseudo terminal of client" .It Li "client_utf8" Ta "" Ta "1 if client supports UTF-8" .It Li "client_width" Ta "" Ta "Width of client" @@ -4828,11 +4828,13 @@ The following variables are available, where appropriate: .It Li "pane_at_left" Ta "" Ta "1 if pane is at the left of window" .It Li "pane_at_right" Ta "" Ta "1 if pane is at the right of window" .It Li "pane_at_top" Ta "" Ta "1 if pane is at the top of window" +.It Li "pane_bg" Ta "" Ta "Pane background colour" .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_fg" Ta "" Ta "Pane foreground colour" .It Li "pane_format" Ta "" Ta "1 if format is for a pane" .It Li "pane_height" Ta "" Ta "Height of pane" .It Li "pane_id" Ta "#D" Ta "Unique pane ID" -- cgit From 6876381276ff2c2a40d304ada27651fdaf1cd8a7 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 22 Feb 2021 08:18:13 +0000 Subject: Move config file path expansion much earlier, keep the list of paths around rather than freeing later, and add a config_files format variable containing it. Suggested by kn@ a while back. --- tmux.1 | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 9150c4a6..c3164e8f 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4763,6 +4763,7 @@ The following variables are available, where appropriate: .It Li "buffer_name" Ta "" Ta "Name of 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 "config_files" Ta "" Ta "List of configuration files loaded" .It Li "client_activity" Ta "" Ta "Time client last had activity" .It Li "client_cell_height" Ta "" Ta "Height of each client cell in pixels" .It Li "client_cell_width" Ta "" Ta "Width of each client cell in pixels" -- cgit From dd7006c850e1f973c214f70eee87a054b00f19e7 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 26 Feb 2021 07:53:26 +0000 Subject: Add a couple of format variables for active and last window index. --- tmux.1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index c3164e8f..a88a1d34 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4756,6 +4756,7 @@ will be replaced by The following variables are available, where appropriate: .Bl -column "XXXXXXXXXXXXXXXXXXX" "XXXXX" .It Sy "Variable name" Ta Sy "Alias" Ta Sy "Replaced with" +.It Li "active_window_index" Ta "" Ta "Index of active window in session" .It Li "alternate_on" Ta "" Ta "1 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" @@ -4763,7 +4764,6 @@ The following variables are available, where appropriate: .It Li "buffer_name" Ta "" Ta "Name of 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 "config_files" Ta "" Ta "List of configuration files loaded" .It Li "client_activity" Ta "" Ta "Time client last had activity" .It Li "client_cell_height" Ta "" Ta "Height of each client cell in pixels" .It Li "client_cell_width" Ta "" Ta "Width of each client cell in pixels" @@ -4790,6 +4790,7 @@ The following variables are available, where appropriate: .It Li "command_list_alias" Ta "" Ta "Command alias if listing commands" .It Li "command_list_name" Ta "" Ta "Command name if listing commands" .It Li "command_list_usage" Ta "" Ta "Command usage if listing commands" +.It Li "config_files" Ta "" Ta "List of configuration files loaded" .It Li "copy_cursor_line" Ta "" Ta "Line the cursor is on in copy mode" .It Li "copy_cursor_word" Ta "" Ta "Word under cursor in copy mode" .It Li "copy_cursor_x" Ta "" Ta "Cursor X position in copy mode" @@ -4812,6 +4813,7 @@ The following variables are available, where appropriate: .It Li "insert_flag" Ta "" Ta "Pane insert flag" .It Li "keypad_cursor_flag" Ta "" Ta "Pane keypad cursor flag" .It Li "keypad_flag" Ta "" Ta "Pane keypad flag" +.It Li "last_window_index" Ta "" Ta "Index of last window in session" .It Li "line" Ta "" Ta "Line number in the list" .It Li "mouse_all_flag" Ta "" Ta "Pane mouse all flag" .It Li "mouse_any_flag" Ta "" Ta "Pane mouse any flag" @@ -4867,8 +4869,8 @@ The following variables are available, where appropriate: .It Li "scroll_position" Ta "" Ta "Scroll position in copy mode" .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 "search_present" Ta "" Ta "1 if search started in copy mode" .It Li "search_match" Ta "" Ta "Search match if any" +.It Li "search_present" Ta "" Ta "1 if search started in copy mode" .It Li "selection_active" Ta "" Ta "1 if selection started and changes with the cursor in copy mode" .It Li "selection_end_x" Ta "" Ta "X position of the end of the selection" .It Li "selection_end_y" Ta "" Ta "Y position of the end of the selection" -- cgit From b6dfb9996a9f73c418b2291a8c29d345966eae7d Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 1 Mar 2021 10:44:38 +0000 Subject: Add some text with examples of ; as a separator, GitHub issues 2522 and 2580. --- tmux.1 | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index a88a1d34..ee07546b 100644 --- a/tmux.1 +++ b/tmux.1 @@ -522,6 +522,69 @@ Commands separated by semicolons together form a - if a command in the sequence encounters an error, no subsequent commands are executed. .Pp +It is recommended that a semicolon used as a command separator should be +written as an individual token, for example from +.Xr sh 1 : +.Bd -literal -offset indent +$ tmux neww \\; splitw +.Ed +.Pp +Or: +.Bd -literal -offset indent +$ tmux neww ';' splitw +.Ed +.Pp +Or from the tmux command prompt: +.Bd -literal -offset indent +neww ; splitw +.Ed +.Pp +However, a trailing semicolon is also interpreted as a command separator, +for example in these +.Xr sh 1 +commands: +.Bd -literal -offset indent +$ tmux neww\\; splitw +.Ed +.Pp +Or: +.Bd -literal -offset indent +$ tmux 'neww;' splitw +.Ed +.Pp +As in these examples, when running tmux from the shell extra care must be taken +to properly quote semicolons: +.Bl -enum -offset Ds +.It +Semicolons that should be interpreted as a command separator +should be escaped according to the shell conventions. +For +.Xr sh 1 +this typically means quoted (such as +.Ql neww ';' splitw ) +or escaped (such as +.Ql neww \\\\; splitw ) . +.It +Individual semicolons or trailing semicolons that should be interpreted as +arguments should be escaped twice: once according to the shell conventions and +a second time for +.Nm ; +for example: +.Bd -literal -offset indent +$ tmux neww 'foo\\;' bar +$ tmux neww foo\\\\; bar +.Ed +.Pp +.It +Semicolons that are not individual tokens or trailing another token should only +be escaped once according to shell conventions; for example: +.Bd -literal -offset indent +$ tmux neww 'foo-;-bar' +$ tmux neww foo-\\;-bar +.Ed +.Pp +.El +.Pp Comments are marked by the unquoted # character - any remaining text after a comment is ignored until the end of the line. .Pp -- cgit From de3a898e8af335325039a4165525fff1d5e1a1b0 Mon Sep 17 00:00:00 2001 From: jmc Date: Mon, 1 Mar 2021 17:49:08 +0000 Subject: escape quotes and remove some unneccessary Pp; ok nicm --- tmux.1 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index ee07546b..4046dbf7 100644 --- a/tmux.1 +++ b/tmux.1 @@ -544,7 +544,7 @@ for example in these .Xr sh 1 commands: .Bd -literal -offset indent -$ tmux neww\\; splitw +$ tmux neww\e\e; splitw .Ed .Pp Or: @@ -563,7 +563,7 @@ For this typically means quoted (such as .Ql neww ';' splitw ) or escaped (such as -.Ql neww \\\\; splitw ) . +.Ql neww \e\e\e\e; splitw ) . .It Individual semicolons or trailing semicolons that should be interpreted as arguments should be escaped twice: once according to the shell conventions and @@ -571,18 +571,16 @@ a second time for .Nm ; for example: .Bd -literal -offset indent -$ tmux neww 'foo\\;' bar -$ tmux neww foo\\\\; bar +$ tmux neww 'foo\e\e;' bar +$ tmux neww foo\e\e\e\e; bar .Ed -.Pp .It Semicolons that are not individual tokens or trailing another token should only be escaped once according to shell conventions; for example: .Bd -literal -offset indent $ tmux neww 'foo-;-bar' -$ tmux neww foo-\\;-bar +$ tmux neww foo-\e\e;-bar .Ed -.Pp .El .Pp Comments are marked by the unquoted # character - any remaining text after a -- cgit From c44750792a9683c5cd6f9df5a69e7417b88772d2 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 2 Mar 2021 10:56:45 +0000 Subject: Drop support for popups where the content is provided directly to tmux (which does not have many practical uses) and only support running a program in the popup. display-popup is now simpler and can accept multiple arguments to avoid escaping problems (like the other commands). --- tmux.1 | 61 ++++++------------------------------------------------------- 1 file changed, 6 insertions(+), 55 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 4046dbf7..8b83732e 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4923,9 +4923,6 @@ The following variables are available, where appropriate: .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 "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" @@ -5584,58 +5581,24 @@ lists the format variables and their values. 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 CE .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 ... +.Op Ar shell-command .Xc .D1 (alias: Ic popup ) -Display a popup on +Display a popup running +.Ar shell-command +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 @@ -5645,14 +5608,6 @@ Two 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 @@ -5665,11 +5620,7 @@ 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. +If omitted, half of the terminal size is used. .Pp The .Fl C -- cgit