summaryrefslogtreecommitdiffstats
path: root/cmd-string.c
authornicm <nicm>2009-07-14 06:38:14 (GMT)
committer nicm <nicm>2009-07-14 06:38:14 (GMT)
commit0371a884eaeecf545f45dc31e01a70ec3f9ef983 (patch) (side-by-side diff)
tree484cabc1e16d6c2667a1c891c1578e6f959f8d0a /cmd-string.c
parentd3b45d872578716e0ecebe983d4aaba929545249 (diff)
downloadtmux-old-0371a884eaeecf545f45dc31e01a70ec3f9ef983.zip
tmux-old-0371a884eaeecf545f45dc31e01a70ec3f9ef983.tar.gz
tmux-old-0371a884eaeecf545f45dc31e01a70ec3f9ef983.tar.bz2
If it exist, load a system-wide configuration file /etc/tmux.conf before any
user-specified one.
Diffstat (limited to 'cmd-string.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cmd-string.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd-string.c b/cmd-string.c
index 818e25e..2fec21d 100644
--- a/cmd-string.c
+++ b/cmd-string.c
@@ -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 */