aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd-string.c9
-rw-r--r--grid.c2
-rw-r--r--key-string.c3
-rw-r--r--server.c13
-rw-r--r--tmux.110
-rw-r--r--tmux.h5
6 files changed, 31 insertions, 11 deletions
diff --git a/cmd-string.c b/cmd-string.c
index e2f451a6..1add4a26 100644
--- a/cmd-string.c
+++ b/cmd-string.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-string.c,v 1.19 2009-07-13 18:03:18 tcunha Exp $ */
+/* $Id: cmd-string.c,v 1.20 2009-07-14 06:38:14 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -158,13 +158,16 @@ cmd_string_parse(const char *s, struct cmd_list **cmdlist, char **cause)
rval = 0;
goto out;
case '~':
- if (have_arg == 0) {
- if ((t = cmd_string_expand_tilde(s, &p)) == NULL)
+ if (!have_arg) {
+ t = cmd_string_expand_tilde(s, &p);
+ if (t == NULL)
goto error;
buf = xrealloc(buf, 1, len + strlen(t) + 1);
strlcpy(buf + len, t, strlen(t) + 1);
len += strlen(t);
xfree(t);
+
+ have_arg = 1;
break;
}
/* FALLTHROUGH */
diff --git a/grid.c b/grid.c
index 98c59e2c..f0169166 100644
--- a/grid.c
+++ b/grid.c
@@ -1,4 +1,4 @@
-/* $Id: grid.c,v 1.22 2009-07-12 17:12:41 nicm Exp $ */
+/* $Id: grid.c,v 1.23 2009-07-14 06:38:14 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
diff --git a/key-string.c b/key-string.c
index fe3e44a6..da82c9fb 100644
--- a/key-string.c
+++ b/key-string.c
@@ -1,4 +1,4 @@
-/* $Id: key-string.c,v 1.17 2009-03-02 18:05:40 nicm Exp $ */
+/* $Id: key-string.c,v 1.18 2009-07-14 06:38:14 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -57,6 +57,7 @@ struct {
{ "PPage", KEYC_PPAGE },
{ "Tab", '\011' },
{ "BTab", KEYC_BTAB },
+ { "BSpace", '\177' },
/* Arrow keys. */
{ "Up", KEYC_UP },
diff --git a/server.c b/server.c
index e441f3cf..7f556952 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* $Id: server.c,v 1.155 2009-07-08 18:03:03 nicm Exp $ */
+/* $Id: server.c,v 1.156 2009-07-14 06:38:14 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -172,6 +172,17 @@ server_start(char *path)
start_time = time(NULL);
socket_path = path;
+ if (access(SYSTEM_CFG, R_OK) != 0) {
+ if (errno != ENOENT) {
+ log_warn("%s", SYSTEM_CFG);
+ exit(1);
+ }
+ } else {
+ if (load_cfg(SYSTEM_CFG, &cause) != 0) {
+ log_warnx("%s", cause);
+ exit(1);
+ }
+ }
if (cfg_file != NULL && load_cfg(cfg_file, &cause) != 0) {
log_warnx("%s", cause);
exit(1);
diff --git a/tmux.1 b/tmux.1
index 822a3451..6d808b23 100644
--- a/tmux.1
+++ b/tmux.1
@@ -1,4 +1,4 @@
-.\" $Id: tmux.1,v 1.112 2009-07-12 17:12:06 nicm Exp $
+.\" $Id: tmux.1,v 1.113 2009-07-14 06:38:14 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -70,7 +70,9 @@ to assume the terminal supports default colours.
Specify an alternative configuration file.
By default,
.Nm
-will look for a config file at
+loads the system configuration file from
+.Pa /etc/tmux.conf ,
+if present, then looks for a user configuration file at
.Pa ~/.tmux.conf .
The configuration file is a set of
.Nm
@@ -1549,11 +1551,13 @@ not be linked to no sessions.
Move up a pane.
.El
.Sh FILES
-.Bl -tag -width "~/.tmux.confXXX" -compact
+.Bl -tag -width "/etc/tmux.confXXX" -compact
.It Pa ~/.tmux.conf
Default
.Nm
configuration file.
+.It Pa /etc/tmux.conf
+System-wide configuration file.
.El
.Sh SEE ALSO
.Xr pty 4
diff --git a/tmux.h b/tmux.h
index dcca8d25..427ef578 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.355 2009-07-12 17:11:39 nicm Exp $ */
+/* $Id: tmux.h,v 1.356 2009-07-14 06:38:14 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -39,8 +39,9 @@
extern const char *__progname;
-/* Default configuration file. */
+/* Default configuration files. */
#define DEFAULT_CFG ".tmux.conf"
+#define SYSTEM_CFG "/etc/tmux.conf"
/* Default prompt history length. */
#define PROMPT_HISTORY 100