version 1.73, 2015/10/27 13:23:24 |
version 1.74, 2015/10/27 15:58:42 |
|
|
goto error; |
goto error; |
} |
} |
} |
} |
if (sy > 0 && options_get_number(&global_s_options, "status")) |
if (sy > 0 && options_get_number(global_s_options, "status")) |
sy--; |
sy--; |
if (sx == 0) |
if (sx == 0) |
sx = 1; |
sx = 1; |
|
|
argc = args->argc; |
argc = args->argc; |
argv = args->argv; |
argv = args->argv; |
} else if (target == NULL) { |
} else if (target == NULL) { |
cmd = options_get_string(&global_s_options, "default-command"); |
cmd = options_get_string(global_s_options, "default-command"); |
if (cmd != NULL && *cmd != '\0') { |
if (cmd != NULL && *cmd != '\0') { |
argc = 1; |
argc = 1; |
argv = &cmd; |
argv = &cmd; |
|
|
/* Construct the environment. */ |
/* Construct the environment. */ |
environ_init(&env); |
environ_init(&env); |
if (c != NULL && !args_has(args, 'E')) { |
if (c != NULL && !args_has(args, 'E')) { |
update = options_get_string(&global_s_options, |
update = options_get_string(global_s_options, |
"update-environment"); |
"update-environment"); |
environ_update(update, &c->environ, &env); |
environ_update(update, &c->environ, &env); |
} |
} |
|
|
/* Create the new session. */ |
/* Create the new session. */ |
idx = -1 - options_get_number(&global_s_options, "base-index"); |
idx = -1 - options_get_number(global_s_options, "base-index"); |
s = session_create(newname, argc, argv, path, cwd, &env, tiop, idx, sx, |
s = session_create(newname, argc, argv, path, cwd, &env, tiop, idx, sx, |
sy, &cause); |
sy, &cause); |
if (s == NULL) { |
if (s == NULL) { |
|
|
if (argc >= 0 && args_has(args, 'n')) { |
if (argc >= 0 && args_has(args, 'n')) { |
w = s->curw->window; |
w = s->curw->window; |
window_set_name(w, args_get(args, 'n')); |
window_set_name(w, args_get(args, 'n')); |
options_set_number(&w->options, "automatic-rename", 0); |
options_set_number(w->options, "automatic-rename", 0); |
} |
} |
|
|
/* |
/* |