diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-14 06:38:14 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-14 06:38:14 +0000 |
commit | d2c3dbc665367ae391ea52828ac1c6007097380a (patch) | |
tree | f79cbc82b2355205ae44ddfae4b658ce98369263 /cmd-string.c | |
parent | 2f75b07d08e68e6173a06fd120e0684d51e29db3 (diff) | |
download | rtmux-d2c3dbc665367ae391ea52828ac1c6007097380a.tar.gz rtmux-d2c3dbc665367ae391ea52828ac1c6007097380a.tar.bz2 rtmux-d2c3dbc665367ae391ea52828ac1c6007097380a.zip |
If it exist, load a system-wide configuration file /etc/tmux.conf before any
user-specified one.
Diffstat (limited to 'cmd-string.c')
-rw-r--r-- | cmd-string.c | 9 |
1 files changed, 6 insertions, 3 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 */ |