Use ~/.tmate.conf to load tmate specific settings

Closes #10
This commit is contained in:
Nicolas Viennot
2013-10-04 17:50:55 -04:00
parent 0d182e707e
commit ed4020b589
3 changed files with 22 additions and 8 deletions

View File

@ -186,6 +186,12 @@ server_start(int lockfd, char *lockfile)
ARRAY_ADD(&cfg_causes, cause);
}
}
if (tmate_cfg_file != NULL) {
if (load_cfg(tmate_cfg_file, cfg_cmd_q, &cause) == -1) {
xasprintf(&cause, "%s: %s", tmate_cfg_file, cause);
ARRAY_ADD(&cfg_causes, cause);
}
}
tmate_session_init();
cmdq_continue(cfg_cmd_q);