I'm using the grouped session feature of tmux to attach to a single session from multiple clients with different screen sizes. Therefore I automatically perform a tmux new-session -t <session_name>
in my ~/.bashrc
. However, I'm running tmux on a remote host that I ssh to, so therefore I often disconnect ssh without manually killing my grouped session. After a while, this leaves behind a long list of unused sessions that haven't been killed
Is it possible to have tmux kill my grouped session when its client detaches (so long as it isn't the last session)?