diff options
author | nicm <nicm> | 2024-02-13 08:10:23 +0000 |
---|---|---|
committer | nicm <nicm> | 2024-02-13 08:10:23 +0000 |
commit | 40b97b1715182b0ab0274b0c402b34e2cba98f04 (patch) | |
tree | c86199966bdea346977810c57693cfa502a92408 /options-table.c | |
parent | 4bdb855020d266ea0a480a53e13c806fcaad9b45 (diff) |
Add two new values for the destroy-unattached option to destroy sessions
only if they are not members of sessions groups, from Mark Huang, GitHub
issue 3806.
Diffstat (limited to 'options-table.c')
-rw-r--r-- | options-table.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/options-table.c b/options-table.c index a42d41c1..df36f1f0 100644 --- a/options-table.c +++ b/options-table.c @@ -85,6 +85,9 @@ static const char *options_table_window_size_list[] = { static const char *options_table_remain_on_exit_list[] = { "off", "on", "failed", NULL }; +static const char *options_table_destroy_unattached_list[] = { + "off", "on", "keep-last", "keep-group", NULL +}; static const char *options_table_detach_on_destroy_list[] = { "off", "on", "no-detached", "previous", "next", NULL }; @@ -484,11 +487,12 @@ const struct options_table_entry options_table[] = { }, { .name = "destroy-unattached", - .type = OPTIONS_TABLE_FLAG, + .type = OPTIONS_TABLE_CHOICE, .scope = OPTIONS_TABLE_SESSION, + .choices = options_table_destroy_unattached_list, .default_num = 0, .text = "Whether to destroy sessions when they have no attached " - "clients." + "clients, or keep the last session whether in the group." }, { .name = "detach-on-destroy", |