| CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Request
Please provide a command to kill all sessions in a session group.
Background
I use session groups to show different windows of the same session on multiple displays simultaneously.
I create and destroy session groups frequently, but tmux does not provide a convenient way to kill all the sessions in a session group at once. I work around this with a shell function similar to this:
function kg --argument-names group
tmux list-sessions -F '#{session_group} #{session_name}' \
| grep "^$group " | cut --delimiter=' ' --fields=2 \
| while read --line session
tmux kill-session -t =$session
end
endIt would be very nice to be able to do this from within tmux. After all, tmux provides kill-server, kill-session, kill-window, and kill-pane. kill-group would be a natural addition, since session groups are a native tmux abstraction.
With kill-group, users could destroy a session group in just a couple of keystrokes using a binding like this:
bind-key K confirm-before kill-group
Thanks
I use tmux all day, every day. This is excellent software. Thanks!