summaryrefslogtreecommitdiffstats
path: root/cmd-new-session.c
diff options
context:
space:
mode:
authorNicolas Viennot <nicolas@viennot.biz>2019-11-03 05:11:37 -0500
committerNicolas Viennot <nicolas@viennot.biz>2019-11-04 18:36:10 -0500
commit6e84bab68ca80f90023d4336467a44098d17a06f (patch)
tree14473dbd2146129d91432efe9cc086891a6757e0 /cmd-new-session.c
parent7f693a97aede385aad30db1412c48f0093b72509 (diff)
Add foreground mode with -F
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r--cmd-new-session.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c
index 357ffed1..fb2f7eab 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -131,6 +131,9 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
if (c == NULL)
detached = 1;
+ if (tmate_foreground)
+ detached = 1;
+
/* Is this client already attached? */
already_attached = 0;
if (c != NULL && c->session != NULL)