From 180faf73afe07d35e6002993a70d5fe63549ffce Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 21 Mar 2013 16:09:59 +0000 Subject: Allow choose commands to be used outside tmux, so long as at least one client is attached. --- tmux.1 | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index ceebfcef..0e788130 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1074,8 +1074,7 @@ For the meaning of the flag, see the .Sx FORMATS section. -This command works only from inside -.Nm . +This command works only if at least one client is attached. .It Xo .Ic choose-list .Op Fl l Ar items @@ -1101,8 +1100,7 @@ also accepts format specifiers. For the meaning of this see the .Sx FORMATS section. -This command works only from inside -.Nm . +This command works only if at least one client is attached. .It Xo .Ic choose-session .Op Fl F Ar format @@ -1124,8 +1122,7 @@ For the meaning of the flag, see the .Sx FORMATS section. -This command works only from inside -.Nm . +This command works only if at least one client is attached. .It Xo .Ic choose-tree .Op Fl s @@ -1189,8 +1186,7 @@ and options, see the .Sx FORMATS section. -This command only works from inside -.Nm . +This command works only if at least one client is attached. .It Xo .Ic choose-window .Op Fl F Ar format @@ -1212,8 +1208,7 @@ For the meaning of the flag, see the .Sx FORMATS section. -This command works only from inside -.Nm . +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) Display a visible indicator of each pane shown by @@ -1257,8 +1252,7 @@ For the meaning of the flag, see the .Sx FORMATS section. -This command only works from inside -.Nm . +This command works only if at least one client is attached. .It Xo Ic join-pane .Op Fl bdhv .Oo Fl l @@ -3306,8 +3300,7 @@ For the meaning of the flag, see the .Sx FORMATS section. -This command works only from inside -.Nm . +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. -- cgit From 4920306486122f3e6c1afd69518dbbdb40fbff5b Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 21 Mar 2013 16:23:46 +0000 Subject: Clarify choose-tree entry in man page. --- tmux.1 | 48 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 0e788130..9ccf9054 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1125,9 +1125,7 @@ section. This command works only if at least one client is attached. .It Xo .Ic choose-tree -.Op Fl s -.Op Fl w -.Op Fl u +.Op Fl suw .Op Fl b Ar session-template .Op Fl c Ar window-template .Op Fl S Ar format @@ -1152,25 +1150,30 @@ is given, will show sessions. If .Fl w is given, will show windows. -If +.Pp +By default, the tree is collapsed and sessions must be expanded to windows +with the right arrow key. +The .Fl u -is given, the tree is uncollapsed by default. +will start with all all sessions expanded instead. +.Pp If .Fl b is given, will override the default session command. Note that .Ql %% -can be used, and will be replaced with the session name. +can be used and will be replaced with the session name. The default option if not specified is "switch-client -t '%%'". If .Fl c is given, will override the default window command. -Note that +Like +.Fl b , .Ql %% -can be used, and will be replaced with the session name and window index. -This command will run -.Ar session-template -before it. +can be used and will be replaced with the session name and window index. +When a window is chosen from the list, the session command is run before the +window command. +.Pp If .Fl S is given will display the specified format instead of the default session @@ -1186,6 +1189,7 @@ and options, see the .Sx FORMATS section. +.Pp This command works only if at least one client is attached. .It Xo .Ic choose-window @@ -1939,6 +1943,19 @@ All window options are documented with the .Ic set-window-option command. .Pp +.Nm +also supports user options which are prefixed with a +.Ql \&@ . +User options may have any name, so long as it is prefixed with +.Ql \&@, +and be set to any string. +For example +.Bd -literal -offset indent +$ tmux setw -q @foo "abc123" +$ tmux showw -v @foo +abc123 +.Ed +.Pp Commands which set options are as follows: .Bl -tag -width Ds .It Xo Ic set-option @@ -2865,7 +2882,7 @@ If this option is set, searches will wrap around the end of the pane contents. The default is on. .El .It Xo Ic show-options -.Op Fl gsw +.Op Fl gsvw .Op Fl t Ar target-session | Ar target-window .Op Ar option .Xc @@ -2881,8 +2898,10 @@ otherwise the session options for Global session or window options are listed if .Fl g is used. +.Fl v +shows only the option value, not the name. .It Xo Ic show-window-options -.Op Fl g +.Op Fl gv .Op Fl t Ar target-window .Op Ar option .Xc @@ -2892,6 +2911,8 @@ List the window options or a single option for or the global window options if .Fl g is used. +.Fl v +shows only the option value, not the name. .El .Sh FORMATS Certain commands accept the @@ -2935,6 +2956,7 @@ The following variables are available, where appropriate: .It Li "client_created_string" Ta "String time client created" .It Li "client_cwd" Ta "Working directory of client" .It Li "client_height" Ta "Height of client" +.It Li "client_prefix" Ta "1 if prefix key has been pressed" .It Li "client_readonly" Ta "1 if client is readonly" .It Li "client_termname" Ta "Terminal name of client" .It Li "client_tty" Ta "Pseudo terminal of client" -- cgit From 55bf2ecc68ad7ab5763def321669375764b3983a Mon Sep 17 00:00:00 2001 From: Jason McIntyre Date: Thu, 21 Mar 2013 17:42:36 +0000 Subject: tweak previous; ok nicm --- tmux.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 9ccf9054..122038ea 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1155,7 +1155,7 @@ By default, the tree is collapsed and sessions must be expanded to windows with the right arrow key. The .Fl u -will start with all all sessions expanded instead. +option will start with all sessions expanded instead. .Pp If .Fl b @@ -1946,8 +1946,8 @@ command. .Nm also supports user options which are prefixed with a .Ql \&@ . -User options may have any name, so long as it is prefixed with -.Ql \&@, +User options may have any name, so long as they are prefixed with +.Ql \&@ , and be set to any string. For example .Bd -literal -offset indent -- cgit From 78543cce30245c3450adc31c8787373c5ca93e38 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 21 Mar 2013 18:43:34 +0000 Subject: Support capture-pane -p to send to stdout. --- tmux.1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 122038ea..72001997 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1036,14 +1036,22 @@ By default, it uses the format but a different format may be specified with .Fl F . .It Xo Ic capture-pane +.Op Fl p .Op Fl b Ar buffer-index +.Op Fl c Ar target-client .Op Fl E Ar end-line .Op Fl S Ar start-line .Op Fl t Ar target-pane .Xc .D1 (alias: Ic capturep ) -Capture the contents of a pane to the specified buffer, or a new buffer if none -is specified. +Capture the contents of a pane. +If +.Fl p +is given, the output goes to +.Ar target-client +stdout, otherwise to the buffer specified with +.Fl b +or a new buffer if omitted. .Pp .Fl S and -- cgit From ad760b3bf702801eaa121715f2a283526d614913 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 22 Mar 2013 10:32:36 +0000 Subject: Add client_session and client_last_session formats. --- tmux.1 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 72001997..acb1a4c1 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2964,8 +2964,10 @@ The following variables are available, where appropriate: .It Li "client_created_string" Ta "String time client created" .It Li "client_cwd" Ta "Working directory of client" .It Li "client_height" Ta "Height of client" +.It Li "client_last_session" Ta "Name of the client's last session" .It Li "client_prefix" Ta "1 if prefix key has been pressed" .It Li "client_readonly" Ta "1 if client is readonly" +.It Li "client_session" Ta "Name of the client's session" .It Li "client_termname" Ta "Terminal name of client" .It Li "client_tty" Ta "Pseudo terminal of client" .It Li "client_utf8" Ta "1 if client supports utf8" -- cgit From f0efa576e002e77dc6363e0a5bc41d0c0649c946 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 22 Mar 2013 10:37:39 +0000 Subject: Add resize-pane -x and -y for absolute pane size (much requested). --- tmux.1 | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index acb1a4c1..674b6506 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1553,17 +1553,25 @@ if specified, to .It Xo Ic resize-pane .Op Fl DLRU .Op Fl t Ar target-pane +.Op Fl x Ar width +.Op Fl y Ar height .Op Ar adjustment .Xc .D1 (alias: Ic resizep ) -Resize a pane, upward with -.Fl U -(the default), downward with +Resize a pane, up, down, left or right by +.Ar adjustment +with +.Fl U , .Fl D , -to the left with .Fl L -and to the right with -.Fl R . +or +.Fl R , +or +to an absolute size +with +.Fl x +or +.Fl y . The .Ar adjustment is given in lines or cells (the default is 1). -- cgit From 8478895eeb014a4219c4d61edd598c05b073db68 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 22 Mar 2013 15:51:54 +0000 Subject: Add -e flag to capture-pane to include embedded ANSI SGR escape sequences, from George Nachman. --- tmux.1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 674b6506..9f48c78f 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1036,9 +1036,9 @@ By default, it uses the format but a different format may be specified with .Fl F . .It Xo Ic capture-pane +.Op Fl e .Op Fl p .Op Fl b Ar buffer-index -.Op Fl c Ar target-client .Op Fl E Ar end-line .Op Fl S Ar start-line .Op Fl t Ar target-pane @@ -1047,11 +1047,12 @@ but a different format may be specified with Capture the contents of a pane. If .Fl p -is given, the output goes to -.Ar target-client -stdout, otherwise to the buffer specified with +is given, the output goes to stdout, otherwise to the buffer specified with .Fl b or a new buffer if omitted. +If +.Fl e +is given, the output includes escape sequences for text and background attributes. .Pp .Fl S and -- cgit From 702ab8bab0e88613aa0e6e6cf8a2e18fdd47341a Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 22 Mar 2013 16:03:35 +0000 Subject: Add a load of miscellaneous pane formats, from George Nachman. --- tmux.1 | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 9f48c78f..416cefa7 100644 --- a/tmux.1 +++ b/tmux.1 @@ -850,7 +850,7 @@ The following keys are supported as appropriate for the mode: .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->" -.It Li "Transpose chars" Ta "" Ta "C-t" +.It Li "Transpose characters" Ta "" Ta "C-t" .El .Pp The next and previous word keys use space and the @@ -912,6 +912,17 @@ command and keys modified or removed with .Ic bind-key and .Ic unbind-key . +One command in accepts an argument, +.Ic copy-pipe , +which copies the selection and pipes it to a command. +For example the following will bind +.Ql C-q +to copy the selection into +.Pa /tmp +as well as the paste buffer: +.Bd -literal -offset indent +bind-key -temacs-copy C-q copy-pipe "cat >/tmp/out" +.Ed .Pp The paste buffer key pastes the first line from the top paste buffer on the stack. @@ -1052,7 +1063,12 @@ is given, the output goes to stdout, otherwise to the buffer specified with or a new buffer if omitted. If .Fl e -is given, the output includes escape sequences for text and background attributes. +is given, the output includes escape sequences for text and background +attributes. +.Fl C +also escapes non-printable characters as octal \\xxx. +.Fl J +joins wrapped lines. .Pp .Fl S and @@ -2965,6 +2981,9 @@ if it is unattached. The following variables are available, where appropriate: .Bl -column "session_created_string" "Replaced with" -offset indent .It Sy "Variable name" Ta Sy "Replaced with" +.It Li "alternate_on" Ta "If pane is in alternate screen" +.It Li "alternate_saved_x" Ta "Saved cursor X in alternate screen" +.It Li "alternate_saved_y" Ta "Saved cursor Y in alternate screen" .It Li "buffer_sample" Ta "First 50 characters from the specified buffer" .It Li "buffer_size" Ta "Size of the specified buffer in bytes" .It Li "client_activity" Ta "Integer time client last had activity" @@ -2981,16 +3000,27 @@ The following variables are available, where appropriate: .It Li "client_tty" Ta "Pseudo terminal of client" .It Li "client_utf8" Ta "1 if client supports utf8" .It Li "client_width" Ta "Width of client" -.It Li "host" Ta "Hostname of local host" +.It Li "cursor_flag" Ta "Pane cursor flag" +.It Li "cursor_x" Ta "Cursor X position in pane" +.It Li "cursor_y" Ta "Cursor Y position in pane" .It Li "history_bytes" Ta "Number of bytes in window history" .It Li "history_limit" Ta "Maximum window history lines" .It Li "history_size" Ta "Size of history in bytes" +.It Li "host" Ta "Hostname of local host" +.It Li "insert_flag" Ta "Pane insert flag" +.It Li "keypad_cursor_flag" Ta "Pane keypad cursor flag" +.It Li "keypad_flag" Ta "Pane keypad flag" .It Li "line" Ta "Line number in the list" +.It Li "mouse_any_flag" Ta "Pane mouse any flag" +.It Li "mouse_button_flag" Ta "Pane mouse button flag" +.It Li "mouse_standard_flag" Ta "Pane mouse standard flag" +.It Li "mouse_utf8_flag" Ta "Pane mouse UTF-8 flag" .It Li "pane_active" Ta "1 if active pane" .It Li "pane_current_path" Ta "Current path if available" .It Li "pane_dead" Ta "1 if pane is dead" .It Li "pane_height" Ta "Height of pane" .It Li "pane_id" Ta "Unique pane ID" +.It Li "pane_in_mode" Ta "If pane is in a mode" .It Li "pane_index" Ta "Index of pane" .It Li "pane_pid" Ta "PID of first process in pane" .It Li "pane_start_command" Ta "Command pane started with" @@ -2998,6 +3028,10 @@ The following variables are available, where appropriate: .It Li "pane_title" Ta "Title of pane" .It Li "pane_tty" Ta "Pseudo terminal of pane" .It Li "pane_width" Ta "Width of pane" +.It Li "saved_cursor_x" Ta "Saved cursor X in pane" +.It Li "saved_cursor_y" Ta "Saved cursor Y in pane" +.It Li "scroll_region_lower" Ta "Bottom of scroll region in pane" +.It Li "scroll_region_upper" Ta "Top of scroll region in pane" .It Li "session_attached" Ta "1 if session attached" .It Li "session_created" Ta "Integer time session created" .It Li "session_created_string" Ta "String time session created" @@ -3017,6 +3051,7 @@ The following variables are available, where appropriate: .It Li "window_name" Ta "Name of window" .It Li "window_panes" Ta "Number of panes in window" .It Li "window_width" Ta "Width of window" +.It Li "wrap_flag" Ta "Pane wrap flag" .El .Sh NAMES AND TITLES .Nm -- cgit From ac1fe83596c7e7aa3639b61be8e5531e09b5bbe8 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 22 Mar 2013 18:45:36 +0000 Subject: Couple of fixes pointed out by jmc. --- tmux.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 416cefa7..33929eff 100644 --- a/tmux.1 +++ b/tmux.1 @@ -912,7 +912,7 @@ command and keys modified or removed with .Ic bind-key and .Ic unbind-key . -One command in accepts an argument, +One command accepts an argument, .Ic copy-pipe , which copies the selection and pipes it to a command. For example the following will bind @@ -1066,7 +1066,7 @@ If is given, the output includes escape sequences for text and background attributes. .Fl C -also escapes non-printable characters as octal \\xxx. +also escapes non-printable characters as octal \exxx. .Fl J joins wrapped lines. .Pp -- cgit From 66edb3392b234ccd9a940039936edb34258c2102 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 24 Mar 2013 09:33:35 +0000 Subject: Expand format variables in the run-shell and if-shell shell commands, from Thiago Padilha. --- tmux.1 | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 33929eff..d708aace 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2704,6 +2704,13 @@ Set clock colour. .Xc Set clock hour format. .Pp +.It Ic command-prefix Ar string +String prefixed to commands (apart from a plain shell as set by the +.Ic default-shell +option). +The default is +.Ql "exec\ " . +.Pp .It Ic force-height Ar height .It Ic force-width Ar width Prevent @@ -3016,6 +3023,7 @@ The following variables are available, where appropriate: .It Li "mouse_standard_flag" Ta "Pane mouse standard flag" .It Li "mouse_utf8_flag" Ta "Pane mouse UTF-8 flag" .It Li "pane_active" Ta "1 if active pane" +.It Li "pane_current_command" Ta "Current command if available" .It Li "pane_current_path" Ta "Current path if available" .It Li "pane_dead" Ta "1 if pane is dead" .It Li "pane_height" Ta "Height of pane" @@ -3025,6 +3033,7 @@ The following variables are available, where appropriate: .It Li "pane_pid" Ta "PID of first process in pane" .It Li "pane_start_command" Ta "Command pane started with" .It Li "pane_start_path" Ta "Path pane started with" +.It Li "pane_tabs" Ta "Pane tab positions" .It Li "pane_title" Ta "Title of pane" .It Li "pane_tty" Ta "Pseudo terminal of pane" .It Li "pane_width" Ta "Width of pane" @@ -3455,7 +3464,11 @@ Miscellaneous commands are as follows: .Bl -tag -width Ds .It Ic clock-mode Op Fl t Ar target-pane Display a large clock. -.It Ic if-shell Ar shell-command command Op Ar command +.It Xo Ic if-shell +.Op Fl t Ar target-pane +.Ar shell-command command +.Op Ar command +.Xc .D1 (alias: Ic if ) Execute the first .Ar command @@ -3464,6 +3477,10 @@ if returns success or the second .Ar command otherwise. +Before being executed, shell-command is expanded using the rules specified in the +.Sx FORMATS +section, including those relevant to +.Ar target-pane . .It Ic lock-server .D1 (alias: Ic lock ) Lock each client individually by running the command specified by the @@ -3477,6 +3494,10 @@ option. Execute .Ar shell-command in the background without creating a window. +Before being executed, shell-command is expanded using the rules specified in +the +.Sx FORMATS +section. After it finishes, any output to stdout is displayed in copy mode (in the pane specified by .Fl t -- cgit From a05b8c41437409f83cb1df2adc0998791d7a2038 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 24 Mar 2013 09:55:02 +0000 Subject: Add a -o option to set-option to prevent setting an option already set, from Thiago Padilha. --- tmux.1 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index d708aace..33902d1b 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1992,7 +1992,7 @@ abc123 Commands which set options are as follows: .Bl -tag -width Ds .It Xo Ic set-option -.Op Fl agqsuw +.Op Fl agoqsuw .Op Fl t Ar target-session | Ar target-window .Ar option Ar value .Xc @@ -2021,6 +2021,10 @@ options. It is not possible to unset a global option. .Pp The +.Fl o +flag prevents setting an option that is already set. +.Pp +The .Fl q flag suppresses the informational message (as if the .Ic quiet @@ -3466,6 +3470,7 @@ Miscellaneous commands are as follows: Display a large clock. .It Xo Ic if-shell .Op Fl t Ar target-pane +.Op Fl b .Ar shell-command command .Op Ar command .Xc @@ -3481,12 +3486,17 @@ Before being executed, shell-command is expanded using the rules specified in th .Sx FORMATS section, including those relevant to .Ar target-pane . +With +.Fl b , +.Ar shell-command +is run in the background. .It Ic lock-server .D1 (alias: Ic lock ) Lock each client individually by running the command specified by the .Ic lock-command option. .It Xo Ic run-shell +.Fl b .Op Fl t Ar target-pane .Ar shell-command .Xc @@ -3498,6 +3508,9 @@ Before being executed, shell-command is expanded using the rules specified in the .Sx FORMATS 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 t -- cgit From 14fad6a5ccd6d5f2b9e372975e0062219853f891 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 24 Mar 2013 09:58:40 +0000 Subject: Add -A flag to new-session to make it behave like attach-session if the session exists. If -A is used, -D behaves like -d to attach-session. --- tmux.1 | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 33902d1b..b0d6b4e7 100644 --- a/tmux.1 +++ b/tmux.1 @@ -666,7 +666,7 @@ command. Lock all clients attached to .Ar target-session . .It Xo Ic new-session -.Op Fl d +.Op Fl AdD .Op Fl n Ar window-name .Op Fl s Ar session-name .Op Fl t Ar target-session @@ -697,6 +697,21 @@ If run from a terminal, any .Xr termios 4 special characters are saved and used for new windows in the new session. .Pp +The +.Fl A +flag makes +.Ic new-session +behave like +.Ic attach-session +if +.Ar session-name +already exists; in the case, +.Fl D +behaves like +.Fl d +to +.Ic attach-session . +.Pp If .Fl t is given, the new session is @@ -1568,7 +1583,7 @@ Rename the current window, or the window at if specified, to .Ar new-name . .It Xo Ic resize-pane -.Op Fl DLRU +.Op Fl DLRUZ .Op Fl t Ar target-pane .Op Fl x Ar width .Op Fl y Ar height @@ -1592,6 +1607,11 @@ or The .Ar adjustment is given in lines or cells (the default is 1). +.Pp +With +.Fl Z , +the active pane is toggled between occupying the whole of the window and its +normal position in the layout. .It Xo Ic respawn-pane .Op Fl k .Op Fl t Ar target-pane -- cgit From 748acdc77ca11a09e637324946a6a4f189defc8e Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 25 Mar 2013 10:09:35 +0000 Subject: Add wait-for -L and -U for lock and unlock, from Thiago Padilha. --- tmux.1 | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index b0d6b4e7..f6055f11 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1062,8 +1062,7 @@ By default, it uses the format but a different format may be specified with .Fl F . .It Xo Ic capture-pane -.Op Fl e -.Op Fl p +.Op Fl aepq .Op Fl b Ar buffer-index .Op Fl E Ar end-line .Op Fl S Ar start-line @@ -1077,13 +1076,19 @@ is given, the output goes to stdout, otherwise to the buffer specified with .Fl b or a new buffer if omitted. If +.Fl a +is given, the alternate screen is used, and the history is not accessible. +If no alternate screen exists, an error will be returned unless +.Fl q +is given. +If .Fl e is given, the output includes escape sequences for text and background attributes. .Fl C also escapes non-printable characters as octal \exxx. .Fl J -joins wrapped lines. +joins wrapped lines and preserves trailing spaces at each line's end. .Pp .Fl S and @@ -2946,7 +2951,7 @@ If this option is set, searches will wrap around the end of the pane contents. The default is on. .El .It Xo Ic show-options -.Op Fl gsvw +.Op Fl gqsvw .Op Fl t Ar target-session | Ar target-window .Op Ar option .Xc @@ -2964,6 +2969,11 @@ Global session or window options are listed if is used. .Fl v shows only the option value, not the name. +If +.Fl q +is set, no error will be returned if +.Ar option +is unset. .It Xo Ic show-window-options .Op Fl gv .Op Fl t Ar target-window @@ -3539,6 +3549,23 @@ If the command doesn't return success, the exit status is also displayed. .It Ic server-info .D1 (alias: Ic info ) Show server information and terminal details. +.It Xo Ic wait-for +.Fl LSU +.Ar channel +.Xc +.D1 (alias: Ic wait ) +When used without options, prevents the client from exiting until woken using +.Ic wait-for +.Fl S +with the same channel. +When +.Fl L +is used, the channel is locked and any clients that try to lock the same +channel are made to wait until the channel is unlocked with +.Ic wait-for +.Fl U . +This command only works from outside +.Nm . .El .Sh TERMINFO EXTENSIONS .Nm -- cgit From 6fee3e9e4b4c68c5d3d7f333c779ac865af7bf86 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 25 Mar 2013 10:11:45 +0000 Subject: Rename session idx to session id throughout and add $ prefix to targets to use it, extended from a diff from George Nachman. --- tmux.1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index f6055f11..74868fc2 100644 --- a/tmux.1 +++ b/tmux.1 @@ -365,9 +365,9 @@ Clients may be listed with the command. .Pp .Ar target-session -is either the name of a session (as listed by the +is the session id prefixed with a $, the name of a session (as listed by the .Ic list-sessions -command) or the name of a client with the same syntax as +command), or the name of a client with the same syntax as .Ar target-client , in which case the session attached to the client is used. When looking for the session name, @@ -3081,6 +3081,7 @@ The following variables are available, where appropriate: .It Li "session_group" Ta "Number of session group" .It Li "session_grouped" Ta "1 if session in a group" .It Li "session_height" Ta "Height of session" +.It Li "session_id" Ta "Unique session ID" .It Li "session_name" Ta "Name of session" .It Li "session_width" Ta "Width of session" .It Li "session_windows" Ta "Number of windows in session" -- cgit From 4119c476aac32ca049991f06fc087d780ed882d1 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 25 Mar 2013 11:46:28 +0000 Subject: b comes before t. --- tmux.1 | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 110 insertions(+), 7 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 74868fc2..5d4864d0 100644 --- a/tmux.1 +++ b/tmux.1 @@ -23,7 +23,7 @@ .Sh SYNOPSIS .Nm tmux .Bk -words -.Op Fl 28lquv +.Op Fl 28lCquv .Op Fl c Ar shell-command .Op Fl f Ar file .Op Fl L Ar socket-name @@ -102,6 +102,11 @@ to assume the terminal supports 256 colours. Like .Fl 2 , but indicates that the terminal supports 88 colours. +.It Fl C +Start in control mode. +Given twice +.Xo ( Fl CC ) Xc +disables echo. .It Fl c Ar shell-command Execute .Ar shell-command @@ -666,7 +671,8 @@ command. Lock all clients attached to .Ar target-session . .It Xo Ic new-session -.Op Fl AdD +.Op Fl AdDP +.Op Fl F Ar format .Op Fl n Ar window-name .Op Fl s Ar session-name .Op Fl t Ar target-session @@ -731,6 +737,14 @@ or are invalid if .Fl t is used. +.Pp +The +.Fl P +option prints information about the new session after it has been created. +By default, it uses the format +.Ql #{session_name}: +but a different format may be specified with +.Fl F . .It Xo Ic refresh-client .Op Fl S .Op Fl t Ar target-client @@ -1062,7 +1076,7 @@ By default, it uses the format but a different format may be specified with .Fl F . .It Xo Ic capture-pane -.Op Fl aepq +.Op Fl aepPq .Op Fl b Ar buffer-index .Op Fl E Ar end-line .Op Fl S Ar start-line @@ -1089,6 +1103,9 @@ attributes. also escapes non-printable characters as octal \exxx. .Fl J joins wrapped lines and preserves trailing spaces at each line's end. +.Fl P +captures only any output that the pane has received that is the beginning of an +as-yet incomplete escape sequence. .Pp .Fl S and @@ -1458,9 +1475,9 @@ option. .It Xo Ic new-window .Op Fl adkP .Op Fl c Ar start-directory +.Op Fl F Ar format .Op Fl n Ar window-name .Op Fl t Ar target-window -.Op Fl F Ar format .Op Ar shell-command .Xc .D1 (alias: Ic neww ) @@ -1615,8 +1632,8 @@ is given in lines or cells (the default is 1). .Pp With .Fl Z , -the active pane is toggled between occupying the whole of the window and its -normal position in the layout. +the active pane is toggled between zoomed (occupying the whole of the window) +and unzoomed (its normal position in the layout). .It Xo Ic respawn-pane .Op Fl k .Op Fl t Ar target-pane @@ -3248,6 +3265,7 @@ The flag is one of the following symbols appended to the window name: .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 @@ -3500,8 +3518,8 @@ 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 t Ar target-pane .Op Fl b +.Op Fl t Ar target-pane .Ar shell-command command .Op Ar command .Xc @@ -3606,6 +3624,91 @@ option above and the .Xr xterm 1 man page. .El +.Sh CONTROL MODE +.Nm +offers a textual interface called +.Em control mode . +This allows applications to communicate with +.Nm +using a simple text-only protocol. +.Pp +In control mode, a client sends +.Nm +commands or command sequences terminated by newlines on standard input. +Each command will produce one block of output on standard output. +An output block consists of a +.Em %begin +line followed by the output (which may be empty). +The output block ends with a +.Em %end +or +.Em %error . +.Em %begin +and matching +.Em %end +or +.Em %error +have two arguments: an integer time (as seconds from epoch) and command number. +For example: +.Bd -literal -offset indent +%begin 1363006971 2 +0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active) +%end 1363006971 2 +.Ed +.Pp +In control mode, +.Nm +outputs notifications. +A notification will never occur inside an output block. +.Pp +The following notifications are defined: +.Bl -tag -width Ds +.It Ic %exit Op Ar reason +The +.Nm +client is exiting immediately, either because it is not attached to any session +or an error occurred. +If present, +.Ar reason +describes why the client exited. +.It Ic %layout-change Ar window-id Ar window-layout +The layout of a window with ID +.Ar window-id +changed. +The new layout is +.Ar window-layout . +.It Ic %output Ar pane-id Ar value +A window pane produced output. +.Ar value +escapes non-printable characters and backslash as octal \\xxx. +.It Ic %session-changed Ar session-id Ar name +The client is now attached to the session with ID +.Ar session-id , +which is named +.Ar name . +.It Ic %session-renamed Ar name +The current session was renamed to +.Ar name . +.It Ic %sessions-changed +A session was created or destroyed. +.It Ic %unlinked-window-add Ar window-id +The window with ID +.Ar window-id +was created but is not linked to the current session. +.It Ic %window-add Ar window-id +The window with ID +.Ar window-id +was linked to the current session. +.It Ic %window-close Ar window-id +The window with ID +.Ar window-id +closed. +.It Ic %window-renamed Ar window-id Ar name +The window with ID +.Ar window-id +was renamed to +.Ar name . +.El .Sh FILES .Bl -tag -width "/etc/tmux.confXXX" -compact .It Pa ~/.tmux.conf -- cgit