summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tmux.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-09-26 20:43:31 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-09-26 20:43:31 +0000
commitb7921d953c0f2364c3aa6ea9ebf8de1be3099904 (patch)
tree19120d92f0fd73c656f06cc58c712be250a020d9 /usr.bin/tmux/tmux.c
parent7fde2299b4752614becf369bf6cf0e69fcc858be (diff)
Two new options:
- server option "exit-unattached" makes the server exit when no clients are attached, even if sessions are present; - session option "destroy-unattached" destroys a session once no clients are attached to it. These are useful for preventing tmux remaining in the background where it is undesirable and when using tmux as a login shell to keep a limit on new sessions.
Diffstat (limited to 'usr.bin/tmux/tmux.c')
-rw-r--r--usr.bin/tmux/tmux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index 3493b2bd35c..f28800f91e2 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.87 2010/08/19 18:29:01 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.88 2010/09/26 20:43:30 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -331,6 +331,7 @@ main(int argc, char **argv)
oo = &global_options;
options_set_number(oo, "quiet", quiet);
options_set_number(oo, "escape-time", 500);
+ options_set_number(oo, "exit-unattached", 0);
options_init(&global_s_options, NULL);
so = &global_s_options;
@@ -341,6 +342,7 @@ main(int argc, char **argv)
options_set_string(so, "default-path", "%s", "");
options_set_string(so, "default-shell", "%s", getshell());
options_set_string(so, "default-terminal", "screen");
+ options_set_number(so, "destroy-unattached", 0);
options_set_number(so, "detach-on-destroy", 1);
options_set_number(so, "display-panes-active-colour", 1);
options_set_number(so, "display-panes-colour", 4);