Skip to content

Commit

Permalink
Polish session messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nviennot committed Nov 7, 2019
1 parent d3c8808 commit 2b14611
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions session.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static void maybe_restart_session(void)
next_session_id = 0;
run_initial_client_cmd();

tmate_info("Shell exited. Shell restarted");
tmate_info("Session shell restarted");

struct session *s;
s = RB_MIN(sessions, &sessions);
Expand All @@ -233,7 +233,7 @@ static void maybe_restart_session(void)
wp = s->curw->window->active;
window_pane_set_mode(wp, &window_copy_mode);
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>~.");
}

Expand Down
5 changes: 4 additions & 1 deletion tmate-session.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ void tmate_session_start(void)
* - While we are parsing the config file, we need to be able to
* 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", "Press <Enter> to dismiss");
cfg_add_cause("%s", "-----------------------------------------------------");
Expand Down

0 comments on commit 2b14611

Please sign in to comment.