Background: An co-worker at my company uses tmux all the time. In our spare-time he taught me enough to master tmux and vim. I have really falled in love with the power of this combination.
Currently, I am mainly using tmux in OS X, when I start the Terminal app. Depending where I go, I choose a different laptop (therefore other OS'es too) and so I often code via ssh remotely with my server running Ubuntu (Server version) where everything is at its place.
Problem: I'd like to connect to my server and instantly have the last tmux session available and never have the need to use the classic bash.
I currently solve it by having tmux new-session -A -s main
in my rc config and using twice CTRL-D
although I still fall back when I exit.
Is there a better way of doing this?
chsh
?