version 1.10, 2009/08/25 14:53:22 |
version 1.11, 2009/09/01 13:09:49 |
|
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
|
#include <paths.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
|
|
struct window_pane *wp; |
struct window_pane *wp; |
struct environ env; |
struct environ env; |
char *cmd, *cwd, *cause; |
char *cmd, *cwd, *cause; |
|
const char *shell; |
u_int hlimit; |
u_int hlimit; |
int size; |
int size; |
enum layout_type type; |
enum layout_type type; |
|
|
if (data->flag_horizontal) |
if (data->flag_horizontal) |
type = LAYOUT_LEFTRIGHT; |
type = LAYOUT_LEFTRIGHT; |
|
|
|
shell = options_get_string(&s->options, "default-shell"); |
|
if (*shell == '\0' || areshell(shell)) |
|
shell = _PATH_BSHELL; |
|
|
wp = window_add_pane(w, hlimit); |
wp = window_add_pane(w, hlimit); |
if (window_pane_spawn(wp, cmd, cwd, &env, &s->tio, &cause) != 0) |
if (window_pane_spawn(wp, cmd, shell, cwd, &env, &s->tio, &cause) != 0) |
goto error; |
goto error; |
if (layout_split_pane(w->active, type, size, wp) != 0) { |
if (layout_split_pane(w->active, type, size, wp) != 0) { |
cause = xstrdup("pane too small"); |
cause = xstrdup("pane too small"); |