diff options
author | 2015-11-24 21:50:06 +0000 | |
---|---|---|
committer | 2015-11-24 21:50:06 +0000 | |
commit | bd389ecbe0b2ddcfd44ad73b797e5b4310e9576d (patch) | |
tree | 2237ea0c745cb5082ad1952aa8fd9cb84c1bb25e | |
parent | hotroot is calculated late in fsck_ffs, so defer the pledge. (diff) | |
download | wireguard-openbsd-bd389ecbe0b2ddcfd44ad73b797e5b4310e9576d.tar.xz wireguard-openbsd-bd389ecbe0b2ddcfd44ad73b797e5b4310e9576d.zip |
All kill-session -C to clear alerts in all windows, suggested by Aaron
U'Ren.
-rw-r--r-- | usr.bin/tmux/cmd-kill-session.c | 15 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 8 |
2 files changed, 17 insertions, 6 deletions
diff --git a/usr.bin/tmux/cmd-kill-session.c b/usr.bin/tmux/cmd-kill-session.c index aa2890db9ea..dce0c609d7d 100644 --- a/usr.bin/tmux/cmd-kill-session.c +++ b/usr.bin/tmux/cmd-kill-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-kill-session.c,v 1.15 2015/09/16 22:40:27 nicm Exp $ */ +/* $OpenBSD: cmd-kill-session.c,v 1.16 2015/11/24 21:50:06 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -31,8 +31,8 @@ enum cmd_retval cmd_kill_session_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_kill_session_entry = { "kill-session", NULL, - "at:", 0, 0, - "[-a] " CMD_TARGET_SESSION_USAGE, + "aCt:", 0, 0, + "[-aC] " CMD_TARGET_SESSION_USAGE, 0, cmd_kill_session_exec }; @@ -42,11 +42,18 @@ cmd_kill_session_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; struct session *s, *sloop, *stmp; + struct winlink *wl; if ((s = cmd_find_session(cmdq, args_get(args, 't'), 0)) == NULL) return (CMD_RETURN_ERROR); - if (args_has(args, 'a')) { + if (args_has(args, 'C')) { + RB_FOREACH(wl, winlinks, &s->windows) { + wl->window->flags &= ~WINDOW_ALERTFLAGS; + wl->flags &= ~WINLINK_ALERTFLAGS; + } + server_redraw_session(s); + } else if (args_has(args, 'a')) { RB_FOREACH_SAFE(sloop, sessions, &sessions, stmp) { if (sloop != s) { server_destroy_session(sloop); diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 085f55dc0b9..cf6daf2a40e 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.463 2015/11/24 20:40:51 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.464 2015/11/24 21:50:06 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> .\" @@ -740,7 +740,7 @@ Kill the .Nm server and clients and destroy all sessions. .It Xo Ic kill-session -.Op Fl a +.Op Fl aC .Op Fl t Ar target-session .Xc Destroy the given session, closing any windows linked to it and no other @@ -748,6 +748,10 @@ sessions, and detaching all clients attached to it. If .Fl a is given, all sessions but the specified one is killed. +The +.Fl C +clears alerts (bell, activity, or silence) in all windows linked to the +session. .It Xo Ic list-clients .Op Fl F Ar format .Op Fl t Ar target-session |