Skip to content

Instantly share code, notes, and snippets.

@mattkenefick
Created October 31, 2018 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattkenefick/2354e2cb66eda301700657cf8f32ebdf to your computer and use it in GitHub Desktop.
Save mattkenefick/2354e2cb66eda301700657cf8f32ebdf to your computer and use it in GitHub Desktop.
TMux aliases for Bashrc
# Tmux aliases
alias '::?'="tmux ls"
function ::() {
local s=$1
if [ -z "$s" ]; then
tmux
elif tmux has-session -t "$s" > /dev/null 2>&1; then
tmux attach -t "$s"
else
tmux new -s "$s"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment