Skip to content

Instantly share code, notes, and snippets.

@enricobacis
Created February 21, 2017 11:06
Show Gist options
  • Save enricobacis/cd020771ab15f4f3b9983f729055d859 to your computer and use it in GitHub Desktop.
Save enricobacis/cd020771ab15f4f3b9983f729055d859 to your computer and use it in GitHub Desktop.
lazy tmux
#!/bin/bash
WHOAMI=$(whoami)
if tmux has-session -t $WHOAMI 2>/dev/null; then
tmux -2 attach-session -t $WHOAMI
else
tmux -2 new-session -s $WHOAMI
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment