mirror of
https://github.com/openbsd/src.git
synced 2026-06-18 07:13:36 +02:00
Rename new-pane -B to -W since -B is best kept to match -B to
display-popup.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: cmd-split-window.c,v 1.130 2026/06/09 09:11:05 nicm Exp $ */
|
||||
/* $OpenBSD: cmd-split-window.c,v 1.131 2026/06/10 16:03:14 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -39,8 +39,8 @@ const struct cmd_entry cmd_new_pane_entry = {
|
||||
.name = "new-pane",
|
||||
.alias = "newp",
|
||||
|
||||
.args = { "bBc:de:EfF:hIkl:Lm:p:PR:s:S:t:T:vx:X:y:Y:Z", 0, -1, NULL },
|
||||
.usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] "
|
||||
.args = { "bc:de:EfF:hIkl:Lm:p:PR:s:S:t:T:vWx:X:y:Y:Z", 0, -1, NULL },
|
||||
.usage = "[-bdefhIklPvWZ] [-c start-directory] [-e environment] "
|
||||
"[-F format] [-l size] [-m message] [-p percentage] "
|
||||
"[-s style] [-S active-border-style] "
|
||||
"[-R inactive-border-style] [-T title] [-x width] [-y height] "
|
||||
@@ -57,8 +57,8 @@ const struct cmd_entry cmd_split_window_entry = {
|
||||
.name = "split-window",
|
||||
.alias = "splitw",
|
||||
|
||||
.args = { "bBc:de:EfF:hIkl:m:p:PR:s:S:t:T:vZ", 0, -1, NULL },
|
||||
.usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] "
|
||||
.args = { "bc:de:EfF:hIkl:m:p:PR:s:S:t:T:vWZ", 0, -1, NULL },
|
||||
.usage = "[-bdefhIklPvWZ] [-c start-directory] [-e environment] "
|
||||
"[-F format] [-l size] [-m message] [-p percentage] "
|
||||
"[-s style] [-S active-border-style] "
|
||||
"[-R inactive-border-style] [-T title] " CMD_TARGET_PANE_USAGE " "
|
||||
@@ -246,13 +246,13 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item)
|
||||
if (input)
|
||||
return (CMD_RETURN_WAIT);
|
||||
|
||||
if (args_has(args, 'B')) {
|
||||
if (args_has(args, 'W')) {
|
||||
/*
|
||||
* With -B, block this command queue item until the pane's
|
||||
* command exits; window_pane_block_finish will be called to
|
||||
* With -W, block this command queue item until the pane's
|
||||
* command exits; window_pane_wait_finish will be called to
|
||||
* continue it.
|
||||
*/
|
||||
new_wp->block_item = item;
|
||||
new_wp->wait_item = item;
|
||||
return (CMD_RETURN_WAIT);
|
||||
}
|
||||
return (CMD_RETURN_NORMAL);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: server.c,v 1.210 2026/06/09 09:11:05 nicm Exp $ */
|
||||
/* $OpenBSD: server.c,v 1.211 2026/06/10 16:03:14 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -491,7 +491,7 @@ server_child_exited(pid_t pid, int status)
|
||||
log_debug("%%%u exited", wp->id);
|
||||
wp->flags |= PANE_EXITED;
|
||||
|
||||
window_pane_block_finish(wp);
|
||||
window_pane_wait_finish(wp);
|
||||
|
||||
if (window_pane_destroy_ready(wp))
|
||||
server_destroy_pane(wp, 1);
|
||||
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: tmux.1,v 1.1078 2026/06/10 14:29:08 nicm Exp $
|
||||
.\" $OpenBSD: tmux.1,v 1.1079 2026/06/10 16:03:14 nicm Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
.\"
|
||||
@@ -3412,7 +3412,7 @@ but a different format may be specified with
|
||||
.Fl F .
|
||||
.Tg newp
|
||||
.It Xo Ic new\-pane
|
||||
.Op Fl bBdefhIkPvZ
|
||||
.Op Fl bdefhIkPvWZ
|
||||
.Op Fl c Ar start\-directory
|
||||
.Op Fl e Ar environment
|
||||
.Op Fl F Ar format
|
||||
@@ -3488,13 +3488,13 @@ but also sets the
|
||||
option for this pane to
|
||||
.Ar message .
|
||||
.Pp
|
||||
.Fl B
|
||||
blocks until
|
||||
.Fl W
|
||||
Waits until
|
||||
.Ar shell\-command
|
||||
exits, then returns its exit status.
|
||||
For example:
|
||||
.Bd -literal -offset indent
|
||||
$ tmux new-pane -B 'vi afile'
|
||||
$ tmux new-pane -W 'vi afile'
|
||||
$ echo $?
|
||||
0
|
||||
.Ed
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: tmux.h,v 1.1342 2026/06/10 14:29:08 nicm Exp $ */
|
||||
/* $OpenBSD: tmux.h,v 1.1343 2026/06/10 16:03:14 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -1266,7 +1266,7 @@ struct window_pane {
|
||||
char tty[TTY_NAME_MAX];
|
||||
int status;
|
||||
struct timeval dead_time;
|
||||
struct cmdq_item *block_item; /* new-pane -B: waiting for pane exit */
|
||||
struct cmdq_item *wait_item; /* new-pane -W: waiting for pane exit */
|
||||
|
||||
int fd;
|
||||
struct bufferevent *event;
|
||||
@@ -3383,7 +3383,7 @@ struct window *window_find_by_id(u_int);
|
||||
void window_update_activity(struct window *);
|
||||
struct window *window_create(u_int, u_int, u_int, u_int);
|
||||
void window_pane_set_event(struct window_pane *);
|
||||
void window_pane_block_finish(struct window_pane *);
|
||||
void window_pane_wait_finish(struct window_pane *);
|
||||
struct window_pane *window_get_active_at(struct window *, u_int, u_int);
|
||||
struct window_pane *window_find_string(struct window *, const char *);
|
||||
int window_has_floating_panes(struct window *);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: window.c,v 1.333 2026/06/09 09:11:05 nicm Exp $ */
|
||||
/* $OpenBSD: window.c,v 1.334 2026/06/10 16:03:14 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -388,7 +388,7 @@ window_pane_destroy_ready(struct window_pane *wp)
|
||||
* If a command queue item is blocked on this pane, wait for the
|
||||
* child's exit status before destroying it.
|
||||
*/
|
||||
if (wp->block_item != NULL && (~wp->flags & PANE_STATUSREADY))
|
||||
if (wp->wait_item != NULL && (~wp->flags & PANE_STATUSREADY))
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
@@ -1086,15 +1086,15 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit)
|
||||
}
|
||||
|
||||
void
|
||||
window_pane_block_finish(struct window_pane *wp)
|
||||
window_pane_wait_finish(struct window_pane *wp)
|
||||
{
|
||||
struct cmdq_item *item = wp->block_item;
|
||||
struct cmdq_item *item = wp->wait_item;
|
||||
struct client *c;
|
||||
int retval = 0;
|
||||
|
||||
if (item == NULL)
|
||||
return;
|
||||
wp->block_item = NULL;
|
||||
wp->wait_item = NULL;
|
||||
|
||||
if (wp->flags & PANE_STATUSREADY) {
|
||||
if (WIFEXITED(wp->status))
|
||||
@@ -1115,7 +1115,7 @@ window_pane_destroy(struct window_pane *wp)
|
||||
struct window_pane_resize *r;
|
||||
struct window_pane_resize *r1;
|
||||
|
||||
window_pane_block_finish(wp);
|
||||
window_pane_wait_finish(wp);
|
||||
|
||||
window_pane_reset_mode_all(wp);
|
||||
free(wp->searchstr);
|
||||
|
||||
Reference in New Issue
Block a user