Merge branch 'master' into floating_panes

This commit is contained in:
Nicholas Marriott
2026-05-18 11:10:09 +01:00
14 changed files with 347 additions and 258 deletions

163
tmux.1
View File

@@ -940,6 +940,37 @@ or
.Ic list\-panes
commands.
.Pp
.Em target\-session ,
.Em target\-window
or
.Em target\-pane
each denote the
.Ql type
of target the command needs to work on.
If a target is not explicitly qualified using
.Ql \&:
and
.Ql \&. ,
.Nm
will pick what seems to be the best choice available.
For example, if a
.Em target-pane
of
.Ql 1
is used with a current window that has only one pane,
.Nm
knows that the
.Ql 1
cannot mean a pane, so it will look for the active pane in window 1, or the
active pane in the current window in session 1.
Only if none of these are present will it report an error.
If it is important that a specific pane, window or session always be used,
such as from a script, the target should be fully qualified (for example a
.Em target-pane
of
.Ql -t:.1 ) ,
or pane, window or session IDs should be used.
.Pp
.Ar shell\-command
arguments are
.Xr sh 1
@@ -3329,46 +3360,22 @@ but a different format may be specified with
.Tg newp
.It Xo Ic new\-pane
.Op Fl bdefhIkPvZ
.Op Fl c Ar start-directory
.Op Fl c Ar start\-directory
.Op Fl e Ar environment
.Op Fl F Ar format
.Op Fl l Ar size
.Op Fl m Ar message
.Op Fl M Ar mode
.Op Fl p Ar percentage
.Op Fl R Ar inactive-border-style
.Op Fl R Ar inactive\-border\-style
.Op Fl s Ar style
.Op Fl S Ar active-border-style
.Op Fl t Ar target-pane
.Op Fl x Ar width
.Op Fl X Ar x-position
.Op Fl y Ar height
.Op Fl Y Ar y-position
.Op Ar shell-command Op Ar argument ...
.Op Fl S Ar active\-border\-style
.Op Fl t Ar target\-pane
.Op Ar shell\-command Op Ar argument ...
.Xc
.D1 Pq alias: Ic newp
Create a new pane.
A
.Ar mode
may be specified with the
.Fl M
option and must be followed by one of the following special values:
.Bl -column "XXXXX" -offset indent
.It Sy "Value" Ta Sy "Meaning"
.It Li "f" Ta "floating pane above the current layout"
.It Li "t" Ta "tiled into the layout by splitting a pane"
.El
.Pp
If no
.Ar mode
is specified,
.Ic f
is assumed.
When creating a tiled pane, a target pane may be specified with
.Fl t .
Note that some options will only affect one
.Ar mode .
.Pp
The new pane is created by splitting
.Ar target\-pane .
If
.Fl d
is given, the session does not make the new pane the current pane.
@@ -3381,48 +3388,7 @@ sets the border style when the pane is active and
.Fl R
sets the border style when the pane is inactive (see
.Sx STYLES ) .
.Fl k
keeps the pane open after the optional
.Ar shell-command
exits and waits for a keypress (any non-mouse key) before closing it.
The message shown is controlled by the
.Ic remain-on-exit-format
option.
.Fl m Ar message
is equivalent to
.Fl k
but also sets the
.Ic remain-on-exit-format
option for this pane to
.Ar message .
An empty
.Ar shell-command
(\[aq]\[aq]) will create a pane with no command running in it.
The
.Fl I
flag (if
.Ar shell-command
is not specified or empty)
will create an empty pane and forward any output from stdin to it.
For example:
.Bd -literal -offset indent
$ make 2>&1|tmux splitw \-dI &
.Ed
.Pp
For floating panes, the following options are availible:
The
.Fl x ,
.Fl y ,
.Fl X ,
and
.Fl Y
options set the width, height, and position of the pane.
If not given, the pane is sized to half the window dimensions and offset from
the previous floating pane.
These four options may be followed by '%' to specify a percentage of the
current window dimensions.
.Pp
For tiled panes, the following options are availible:
.Fl h
does a horizontal split and
.Fl v
@@ -3437,6 +3403,8 @@ columns (for horizontal split);
may be followed by
.Ql %
to specify a percentage of the available space.
.Fl p
is a shorthand option for this.
The
.Fl b
option causes the new pane to be created to the left of or above
@@ -3449,9 +3417,37 @@ or full window width (with
.Fl v ) ,
instead of splitting the active pane.
.Pp
.Fl k
keeps the pane open after the optional
.Ar shell\-command
exits and waits for a key to be pressed before closing it.
The message shown is controlled by the
.Ic remain\-on\-exit\-format
option.
.Fl m Ar message
is equivalent to
.Fl k
but also sets the
.Ic remain\-on\-exit\-format
option for this pane to
.Ar message .
.Pp
An empty
.Ar shell\-command
(\[aq]\[aq]) will create a pane with no command running in it.
The
.Fl I
flag (if
.Ar shell\-command
is not specified or empty)
will create an empty pane and forward any output from stdin to it.
For example:
.Bd -literal -offset indent
$ make 2>&1|tmux splitw \-dI &
.Ed
.Pp
All other options have the same meaning as for the
.Ic new-window
command.
.Ic new\-window
.Tg nextl
.It Ic next\-layout Op Fl t Ar target\-window
.D1 Pq alias: Ic nextl
@@ -3777,26 +3773,21 @@ the command behaves like
.Tg splitw
.It Xo Ic split\-window
.Op Fl bdefhIkPvZ
.Op Fl c Ar start-directory
.Op Fl c Ar start\-directory
.Op Fl e Ar environment
.Op Fl F Ar format
.Op Fl l Ar size
.Op Fl m Ar message
.Op Fl M Ar mode
.Op Fl p Ar percentage
.Op Fl R Ar inactive-border-style
.Op Fl R Ar inactive\-border\-style
.Op Fl s Ar style
.Op Fl S Ar active-border-style
.Op Fl t Ar target-pane
.Op Fl x Ar width
.Op Fl X Ar x-position
.Op Fl y Ar height
.Op Fl Y Ar y-position
.Op Ar shell-command Op Ar argument ...
.Op Fl S Ar active\-border\-style
.Op Fl t Ar target\-pane
.Op Ar shell\-command Op Ar argument ...
.Xc
.D1 Pq alias: Ic splitw
Creates a new pane.
Default behavior is to split the pane in a tiled layout.
Creates a new pane by splitting
.Ar target\-pane .
Shares behavior with
.Ic new\-pane .
.Pp