aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tmux.113
-rw-r--r--tmux.c15
2 files changed, 11 insertions, 17 deletions
diff --git a/tmux.1 b/tmux.1
index 0dc68bfe..9b1488fc 100644
--- a/tmux.1
+++ b/tmux.1
@@ -98,10 +98,6 @@ The options are as follows:
Force
.Nm
to assume the terminal supports 256 colours.
-.It Fl 8
-Like
-.Fl 2 ,
-but indicates that the terminal supports 88 colours.
.It Fl C
Start in control mode.
Given twice
@@ -145,11 +141,12 @@ session created, and continues to process the rest of the configuration file.
.It Fl L Ar socket-name
.Nm
stores the server socket in a directory under
-.Pa /tmp
-(or
+.Ev TMUX_TMPDIR ,
.Ev TMPDIR
-if set);
-the default socket is named
+if it is unset, or
+.Pa /tmp
+if both are unset.
+The default socket is named
.Em default .
This option allows a different socket name to be specified, allowing several
independent
diff --git a/tmux.c b/tmux.c
index 368562f8..1f4057dc 100644
--- a/tmux.c
+++ b/tmux.c
@@ -164,10 +164,12 @@ makesocketpath(const char *label)
u_int uid;
uid = getuid();
- if ((s = getenv("TMPDIR")) == NULL || *s == '\0')
- xsnprintf(base, sizeof base, "%s/tmux-%u", _PATH_TMP, uid);
- else
+ if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0')
+ xsnprintf(base, sizeof base, "%s/", s);
+ else if ((s = getenv("TMPDIR")) != NULL && *s != '\0')
xsnprintf(base, sizeof base, "%s/tmux-%u", s, uid);
+ else
+ xsnprintf(base, sizeof base, "%s/tmux-%u", _PATH_TMP, uid);
if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST)
return (NULL);
@@ -244,15 +246,10 @@ main(int argc, char **argv)
quiet = flags = 0;
label = path = NULL;
login_shell = (**argv == '-');
- while ((opt = getopt(argc, argv, "28c:Cdf:lL:qS:uUv")) != -1) {
+ while ((opt = getopt(argc, argv, "2c:Cdf:lL:qS:uUv")) != -1) {
switch (opt) {
case '2':
flags |= IDENTIFY_256COLOURS;
- flags &= ~IDENTIFY_88COLOURS;
- break;
- case '8':
- flags |= IDENTIFY_88COLOURS;
- flags &= ~IDENTIFY_256COLOURS;
break;
case 'c':
free(shell_cmd);