version 1.18, 2017/03/09 17:02:38 |
version 1.19, 2017/04/25 15:35:10 |
|
|
|
|
/* Create initial environment for new child. */ |
/* Create initial environment for new child. */ |
struct environ * |
struct environ * |
environ_for_session(struct session *s) |
environ_for_session(struct session *s, int no_TERM) |
{ |
{ |
struct environ *env; |
struct environ *env; |
const char *value; |
const char *value; |
|
|
if (s != NULL) |
if (s != NULL) |
environ_copy(s->environ, env); |
environ_copy(s->environ, env); |
|
|
value = options_get_string(global_options, "default-terminal"); |
if (!no_TERM) { |
environ_set(env, "TERM", "%s", value); |
value = options_get_string(global_options, "default-terminal"); |
|
environ_set(env, "TERM", "%s", value); |
|
} |
|
|
if (s != NULL) |
if (s != NULL) |
idx = s->id; |
idx = s->id; |