Last active
December 18, 2015 17:28
-
-
Save Glutnix/5818428 to your computer and use it in GitHub Desktop.
Notification of existing tmux sessions. Add this to your .bashrc or .zshrc to be told when you login.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -z "$TMUX" ]; then # not currently in a tmux session | |
tmux has-session >/dev/null 2>/dev/null | |
if [ $? = 0 ]; then # previous command exited with status 0 | |
echo " " | |
echo "tmux: There are tmux session(s) running." | |
tmux ls | |
echo "run 'tmux attach' to re-attach." | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment