Add -B to new-pane/split-window to block until the command exits, like

run-shell -b.
This commit is contained in:
nicm
2026-06-09 09:11:05 +00:00
parent 27c58c764d
commit d5c9196348
5 changed files with 62 additions and 3 deletions

13
tmux.1
View File

@@ -3380,7 +3380,7 @@ but a different format may be specified with
.Fl F .
.Tg newp
.It Xo Ic new\-pane
.Op Fl bdefhIkPvZ
.Op Fl bBdefhIkPvZ
.Op Fl c Ar start\-directory
.Op Fl e Ar environment
.Op Fl F Ar format
@@ -3456,6 +3456,17 @@ but also sets the
option for this pane to
.Ar message .
.Pp
.Fl B
blocks until
.Ar shell\-command
exits, then returns its exit status.
For example:
.Bd -literal -offset indent
$ tmux new-pane -B 'vi afile'
$ echo $?
0
.Ed
.Pp
.Fl E ,
or an empty
.Ar shell\-command ,