Use sysconfdir for the location of global tmux.conf (but default it to /etc),

based on changes from Dagobert Michelsen.
This commit is contained in:
Nicholas Marriott
2013-04-24 10:57:03 +01:00
parent 11b90bc959
commit 4f3c31a6b6
6 changed files with 15 additions and 15 deletions

2
tmux.c
View File

@ -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;