mirror of
https://github.com/tmate-io/tmate.git
synced 2025-06-13 21:27:18 +02:00
parent
6e84bab68c
commit
c63c8fbf90
16
cfg.c
16
cfg.c
@ -71,7 +71,7 @@ start_cfg(void)
|
|||||||
cfg_add_cause("%s: %s", TMUX_CONF, strerror(errno));
|
cfg_add_cause("%s: %s", TMUX_CONF, strerror(errno));
|
||||||
|
|
||||||
if (cfg_file == NULL && (home = find_home()) != NULL) {
|
if (cfg_file == NULL && (home = find_home()) != NULL) {
|
||||||
xasprintf(&cfg_file, "%s/.tmux.conf", home);
|
xasprintf(&cfg_file, "%s/.tmate.conf", home);
|
||||||
if (access(cfg_file, R_OK) != 0 && errno == ENOENT) {
|
if (access(cfg_file, R_OK) != 0 && errno == ENOENT) {
|
||||||
free(cfg_file);
|
free(cfg_file);
|
||||||
cfg_file = NULL;
|
cfg_file = NULL;
|
||||||
@ -81,20 +81,6 @@ start_cfg(void)
|
|||||||
cfg_add_cause("%s: %s", cfg_file, cause);
|
cfg_add_cause("%s: %s", cfg_file, cause);
|
||||||
free(cause);
|
free(cause);
|
||||||
|
|
||||||
#ifdef TMATE
|
|
||||||
cause = NULL;
|
|
||||||
if ((home = find_home()) != NULL) {
|
|
||||||
xasprintf(&tmate_cfg_file, "%s/.tmate.conf", home);
|
|
||||||
if (access(tmate_cfg_file, R_OK) != 0 && errno == ENOENT) {
|
|
||||||
free(tmate_cfg_file);
|
|
||||||
tmate_cfg_file = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (tmate_cfg_file != NULL && load_cfg(tmate_cfg_file, cfg_cmd_q, &cause) == -1)
|
|
||||||
cfg_add_cause("%s: %s", cfg_file, cause);
|
|
||||||
free(cause);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cmdq_continue(cfg_cmd_q);
|
cmdq_continue(cfg_cmd_q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ session_destroy(struct session *s)
|
|||||||
next_session_id = 0;
|
next_session_id = 0;
|
||||||
run_initial_client_cmd();
|
run_initial_client_cmd();
|
||||||
} else {
|
} else {
|
||||||
tmate_info("Session terminated");
|
tmate_info("Session closed");
|
||||||
tmate_write_fin();
|
tmate_write_fin();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
3
tmux.c
3
tmux.c
@ -59,8 +59,7 @@ __dead void
|
|||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage: %s [-2CluvV] [-c shell-command] [-f file] [-L socket-name]\n"
|
"usage: %s [-vVF] [-f config-file] [-S socket-path] [command [flags]]\n",
|
||||||
" [-S socket-path] [command [flags]]\n",
|
|
||||||
__progname);
|
__progname);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user