Skip to content

Instantly share code, notes, and snippets.

@cpb
Created March 13, 2013 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpb/5156041 to your computer and use it in GitHub Desktop.
Save cpb/5156041 to your computer and use it in GitHub Desktop.
Good to add to your raspberry pi's shell rc
# TMUX
if which tmux 2>&1 >/dev/null; then
# if no session is started, start a new session
test -z ${TMUX} && (tmux attach || tmux new-session)
# when quitting tmux, try to attach
while test -z ${TMUX}; do
tmux attach || break
done
fi
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment