Created
October 31, 2018 02:10
-
-
Save mattkenefick/2354e2cb66eda301700657cf8f32ebdf to your computer and use it in GitHub Desktop.
TMux aliases for Bashrc
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
# 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