Revision: 2822
http://tmux.svn.sourceforge.net/tmux/?rev=2822&view=rev
Author: tcunha
Date: 2012-06-18 15:12:54 +0000 (Mon, 18 Jun 2012)
Log Message:
-----------
Sync OpenBSD patchset 1134:
Add -a for kill-session, from Thomas Adam.
Modified Paths:
--------------
trunk/cmd-kill-session.c
trunk/tmux.1
Modified: trunk/cmd-kill-session.c
===================================================================
--- trunk/cmd-kill-session.c 2012-06-18 15:11:35 UTC (rev 2821)
+++ trunk/cmd-kill-session.c 2012-06-18 15:12:54 UTC (rev 2822)
@@ -31,8 +31,8 @@
const struct cmd_entry cmd_kill_session_entry = {
"kill-session", NULL,
- "t:", 0, 0,
- CMD_TARGET_SESSION_USAGE,
+ "at:", 0, 0,
+ "[-a] " CMD_TARGET_SESSION_USAGE,
0,
NULL,
NULL,
@@ -43,13 +43,21 @@
cmd_kill_session_exec(struct cmd *self, struct cmd_ctx *ctx)
{
struct args *args = self->args;
- struct session *s;
+ struct session *s, *s2, *s3;
if ((s = cmd_find_session(ctx, args_get(args, 't'), 0)) == NULL)
return (-1);
- server_destroy_session(s);
- session_destroy(s);
-
+ if (args_has(args, 'a')) {
+ RB_FOREACH_SAFE(s2, sessions, &sessions, s3) {
+ if (s != s2) {
+ server_destroy_session(s2);
+ session_destroy(s2);
+ }
+ }
+ } else {
+ server_destroy_session(s);
+ session_destroy(s);
+ }
return (0);
}
Modified: trunk/tmux.1
===================================================================
--- trunk/tmux.1 2012-06-18 15:11:35 UTC (rev 2821)
+++ trunk/tmux.1 2012-06-18 15:12:54 UTC (rev 2822)
@@ -614,9 +614,14 @@
Kill the
.Nm
server and clients and destroy all sessions.
-.It Ic kill-session Op Fl t Ar target-session
+.It Ic kill-session
+.Op Fl a
+.Op Fl t Ar target-session
Destroy the given session, closing any windows linked to it and no other
sessions, and detaching all clients attached to it.
+If
+.Fl a
+is given, all sessions but the specified one is killed.
.It Xo Ic list-clients
.Op Fl F Ar format
.Op Fl t Ar target-session
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs