brew install tmux
http://blog.edsantiago.com/articles/tmux-session-preserve/
specifically:
goes in your home dir: http://blog.edsantiago.com/articles/tmux-session-preserve/.bashrc.tmux
goes in /usr/local/bin (or $PATH of your choice): http://blog.edsantiago.com/articles/tmux-session-preserve/tmux-session
mkdir ~/.bash_history.d
chmod 700 ~/.bash_history.d
sudo cpan
install IPC::Run
#tmux recovery script
alias 'tshortcut'='tmux-session new seshname.window1 seshname.window2; tmux attach -t seshname'
#mac os x doesn't have cat
alias 'tac'='tail -r'
#loads the script
if [ ! -z "$PS1" ]; then
_tmuxrc="$HOME/.bashrc.tmux"
if [ -e $_tmuxrc ]; then
source $_tmuxrc
_tmux-init-history
fi
fi
tmux-session new seshname.window1 seshname.window2
tmux attach -t seshname
save some env variables:
http://stackoverflow.com/questions/8645053/how-do-i-start-tmux-with-my-current-environment
Scripts not found. This is backwards, the code should be in GitHub, the whole point to post this on Github is to preserve the code.