From 7f636587098593c6c0efd3feaecb970aa7170116 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 27 Mar 2013 11:24:18 +0000 Subject: Add TMUX_TMPDIR variable to put the socket directory outside TMPDIR. From Ben Boeckel. --- tmux.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'tmux.c') 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); -- cgit From 7f9b225cc269211b86a4c4d2168146c217d63118 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 11 Apr 2013 21:52:18 +0000 Subject: Call setlocale(LC_TIME) at startup. --- tmux.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tmux.c') diff --git a/tmux.c b/tmux.c index 1f4057dc..e9b28d7e 100644 --- a/tmux.c +++ b/tmux.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -243,6 +244,8 @@ main(int argc, char **argv) malloc_options = (char *) "AFGJPX"; #endif + setlocale(LC_TIME, ""); + quiet = flags = 0; label = path = NULL; login_shell = (**argv == '-'); -- cgit From 2c4543b9e9bd38bcc45393dad94930bcde872e6c Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Sun, 14 Apr 2013 18:07:08 +0100 Subject: Add back missing -V flag This went walkies from a previous git commit. --- tmux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmux.c') diff --git a/tmux.c b/tmux.c index e8fd98b2..e6de5cfe 100644 --- a/tmux.c +++ b/tmux.c @@ -253,7 +253,7 @@ main(int argc, char **argv) quiet = flags = 0; label = path = NULL; login_shell = (**argv == '-'); - while ((opt = getopt(argc, argv, "2c:Cdf:lL:qS:uUv")) != -1) { + while ((opt = getopt(argc, argv, "2c:Cdf:lL:qS:uUVv")) != -1) { switch (opt) { case '2': flags |= IDENTIFY_256COLOURS; -- cgit From a46ccbd883495d2acb3eab89e5bcdb61c0c7e195 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 22 Apr 2013 09:39:21 +0100 Subject: -paths.h. Fixes Solaris, from Dagobert Michelsen. --- tmux.c | 1 - 1 file changed, 1 deletion(-) (limited to 'tmux.c') diff --git a/tmux.c b/tmux.c index e6de5cfe..2916bbb5 100644 --- a/tmux.c +++ b/tmux.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include -- cgit From 4f3c31a6b63f4489bfc672b510036fd8d9491595 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 24 Apr 2013 10:57:03 +0100 Subject: Use sysconfdir for the location of global tmux.conf (but default it to /etc), based on changes from Dagobert Michelsen. --- tmux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmux.c') diff --git a/tmux.c b/tmux.c index 2916bbb5..606c574f 100644 --- a/tmux.c +++ b/tmux.c @@ -363,7 +363,7 @@ main(int argc, char **argv) if (pw != NULL) home = pw->pw_dir; } - xasprintf(&cfg_file, "%s/%s", home, DEFAULT_CFG); + xasprintf(&cfg_file, "%s/.tmux.conf", home); if (access(cfg_file, R_OK) != 0 && errno == ENOENT) { free(cfg_file); cfg_file = NULL; -- cgit