mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
Add a default-terminal option to set the starting value of $TERM in new
windows. This is "screen" by default and must be either that or something closely related. This does makes it easier to customise it if necessary.
This commit is contained in:
@ -29,8 +29,8 @@ int server_lock_callback(void *, const char *);
|
||||
const char **
|
||||
server_fill_environ(struct session *s)
|
||||
{
|
||||
static const char *env[] = { NULL /* TMUX= */, "TERM=screen", NULL };
|
||||
static char tmuxvar[MAXPATHLEN + 256];
|
||||
static const char *env[] = { NULL /* TMUX= */, NULL /* TERM */, NULL };
|
||||
static char tmuxvar[MAXPATHLEN + 256], termvar[256];
|
||||
u_int idx;
|
||||
|
||||
if (session_index(s, &idx) != 0)
|
||||
@ -40,6 +40,10 @@ server_fill_environ(struct session *s)
|
||||
"TMUX=%s,%ld,%u", socket_path, (long) getpid(), idx);
|
||||
env[0] = tmuxvar;
|
||||
|
||||
xsnprintf(termvar, sizeof termvar,
|
||||
"TERM=%s", options_get_string(&s->options, "default-terminal"));
|
||||
env[1] = termvar;
|
||||
|
||||
return (env);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user