Polish session messages

This commit is contained in:
Nicolas Viennot 2019-11-07 13:31:28 -05:00
parent d3c8808b0f
commit 2b14611544
2 changed files with 6 additions and 3 deletions

View File

@ -222,7 +222,7 @@ static void maybe_restart_session(void)
next_session_id = 0; next_session_id = 0;
run_initial_client_cmd(); run_initial_client_cmd();
tmate_info("Shell exited. Shell restarted"); tmate_info("Session shell restarted");
struct session *s; struct session *s;
s = RB_MIN(sessions, &sessions); s = RB_MIN(sessions, &sessions);
@ -233,7 +233,7 @@ static void maybe_restart_session(void)
wp = s->curw->window->active; wp = s->curw->window->active;
window_pane_set_mode(wp, &window_copy_mode); window_pane_set_mode(wp, &window_copy_mode);
window_copy_init_for_output(wp); window_copy_init_for_output(wp);
window_copy_add(wp, "%s", "Shell exited. Shell restarted."); window_copy_add(wp, "%s", "Session shell restarted");
window_copy_add(wp, "%s", "Note: press the following sequence to disconnect from SSH: <Enter>~."); window_copy_add(wp, "%s", "Note: press the following sequence to disconnect from SSH: <Enter>~.");
} }

View File

@ -190,7 +190,10 @@ void tmate_session_start(void)
* - While we are parsing the config file, we need to be able to * - While we are parsing the config file, we need to be able to
* serialize it, and so we need a worker encoder. * serialize it, and so we need a worker encoder.
*/ */
if (!tmate_foreground) { if (tmate_foreground) {
tmate_set_val("foreground", "true");
tmate_info("To connect to the session locally, run: tmate -S %s attach", socket_path);
} else {
cfg_add_cause("%s", "To see these messages again, run: tmate show-messages"); cfg_add_cause("%s", "To see these messages again, run: tmate show-messages");
cfg_add_cause("%s", "Press <Enter> to dismiss"); cfg_add_cause("%s", "Press <Enter> to dismiss");
cfg_add_cause("%s", "-----------------------------------------------------"); cfg_add_cause("%s", "-----------------------------------------------------");