version 1.48, 2013/11/22 20:58:36 |
version 1.49, 2014/04/17 13:02:59 |
|
|
struct window *w; |
struct window *w; |
struct window_pane *wp, *new_wp = NULL; |
struct window_pane *wp, *new_wp = NULL; |
struct environ env; |
struct environ env; |
const char *cmd, *shell, *template; |
const char *cmd, *path, *shell, *template; |
char *cause, *new_cause, *cp; |
char *cause, *new_cause, *cp; |
u_int hlimit; |
u_int hlimit; |
int size, percentage, cwd, fd = -1; |
int size, percentage, cwd, fd = -1; |
|
|
struct layout_cell *lc; |
struct layout_cell *lc; |
struct client *c; |
struct client *c; |
struct format_tree *ft; |
struct format_tree *ft; |
|
struct environ_entry *envent; |
|
|
if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp)) == NULL) |
if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp)) == NULL) |
return (CMD_RETURN_ERROR); |
return (CMD_RETURN_ERROR); |
|
|
goto error; |
goto error; |
} |
} |
new_wp = window_add_pane(w, hlimit); |
new_wp = window_add_pane(w, hlimit); |
|
|
|
path = NULL; |
|
if (cmdq->client != NULL && cmdq->client->session == NULL) |
|
envent = environ_find(&cmdq->client->environ, "PATH"); |
|
else |
|
envent = environ_find(&s->environ, "PATH"); |
|
if (envent != NULL) |
|
path = envent->value; |
|
|
if (window_pane_spawn( |
if (window_pane_spawn( |
new_wp, cmd, shell, cwd, &env, s->tio, &cause) != 0) |
new_wp, cmd, path, shell, cwd, &env, s->tio, &cause) != 0) |
goto error; |
goto error; |
layout_assign_pane(lc, new_wp); |
layout_assign_pane(lc, new_wp); |
|
|