Skip to content

Instantly share code, notes, and snippets.

@noname1007
Created March 26, 2023 10:09
Show Gist options
  • Save noname1007/846de4f69299b964d55662c183331dce to your computer and use it in GitHub Desktop.
Save noname1007/846de4f69299b964d55662c183331dce to your computer and use it in GitHub Desktop.
Tmux-Sesion.bashrc
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
tmux attach-session -t $USER || tmux new-session -s $USER
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment