Created
January 6, 2014 13:36
-
-
Save dschulz/8282982 to your computer and use it in GitHub Desktop.
Manera sucia de asociar sesiones tmux al iniciar sesión.
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
#Agregar esto al final de .bash_profile | |
declare -i TMUXES=`ps aux | grep tmux | grep -v grep | wc -l` | |
if [ $TMUXES -gt 0 ] && [ -z "$TMUX" ] ; then | |
echo -e "\n\n\033[01;34mParece que hay una sesion tmux\033[0m" | |
read -p "Asociar? (s): " -n 1 ASOCIAR | |
case $ASOCIAR in | |
s) | |
tmux attach | |
;; | |
*) | |
echo "Ok." | |
;; | |
esac | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment