After reading the code a little bit, I'm guessing this is not possible
at the moment.

Nicholas, what are your thoughts about adding another option to the
new-session command, one that would let the user pass a command to be
executed right before the session is destroyed, eg:

tmux new-session -d -s session_x -c 'run ~/session_x_cleanup_script.sh'

It would be a great feature to have, cleanly exit programs while never
having to do it manually. Simply write a script that uses tmux
send-keys and any kind of cleanup is possible.

Besides, since it is a common practice to script tmux sessions I guess
it makes sense to provide a way for the user to script the cleanup.

On Sun, Mar 17, 2013 at 9:59 AM, Thiago Padilha <tpadilh...@gmail.com> wrote:
> Is it possible for me to run a script or do some cleanup when a
> session is about to exit? eg: send write/quit commands to vim
> instances running in detached sessions when rebooting the computer.
>
> Sometimes I have lots of tmux sessions in background and it is
> annoying attach to each session and manually close each programs.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to