version 1.16, 2015/10/31 08:13:58 |
version 1.17, 2015/12/13 14:32:38 |
|
|
"respawn-pane", "respawnp", |
"respawn-pane", "respawnp", |
"kt:", 0, -1, |
"kt:", 0, -1, |
"[-k] " CMD_TARGET_PANE_USAGE " [command]", |
"[-k] " CMD_TARGET_PANE_USAGE " [command]", |
0, |
CMD_PANE_T, |
cmd_respawn_pane_exec |
cmd_respawn_pane_exec |
}; |
}; |
|
|
|
|
cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq) |
cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq) |
{ |
{ |
struct args *args = self->args; |
struct args *args = self->args; |
struct winlink *wl; |
struct winlink *wl = cmdq->state.tflag.wl; |
struct window *w; |
struct window *w = wl->window; |
struct window_pane *wp; |
struct window_pane *wp = cmdq->state.tflag.wp; |
struct session *s; |
struct session *s = cmdq->state.tflag.s; |
struct environ *env; |
struct environ *env; |
const char *path; |
const char *path; |
char *cause; |
char *cause; |
u_int idx; |
u_int idx; |
struct environ_entry *envent; |
struct environ_entry *envent; |
|
|
if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp)) == NULL) |
|
return (CMD_RETURN_ERROR); |
|
w = wl->window; |
|
|
|
if (!args_has(self->args, 'k') && wp->fd != -1) { |
if (!args_has(self->args, 'k') && wp->fd != -1) { |
if (window_pane_index(wp, &idx) != 0) |
if (window_pane_index(wp, &idx) != 0) |