Skip to content

Instantly share code, notes, and snippets.

@dschulz
Created January 6, 2014 13:36
Show Gist options
  • Save dschulz/8282982 to your computer and use it in GitHub Desktop.
Save dschulz/8282982 to your computer and use it in GitHub Desktop.
Manera sucia de asociar sesiones tmux al iniciar sesión.
#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