A simple shell script that will start a default scratch ( ala emacs ) session whenever a new terminal tab/window is opened. This way, most hack sessions can be confined to that session instead of numerous unnamed session lying around.
( This goes into ~/.zprofile
)
tmux has -t scratch &> /dev/null
if [ $? != 0 ]; then
tmux -2 new-session -s scratch -D -d
fi
if [ -z "$TMUX" ]; then
tmux attach -t scratch -d
fi