diff --git a/roles/home-cli/files/shrc b/roles/home-cli/files/shrc index 4ddf0f9..e68d75c 100644 --- a/roles/home-cli/files/shrc +++ b/roles/home-cli/files/shrc @@ -92,7 +92,6 @@ alias ls="/bin/ls $LSOPTIONS" alias now="date +%Y%m%dT%H%M%S%z" alias nowu="date -u +%Y%m%dT%H%M%SZ" alias ta="$HOME/opt/textadept/textadept" -alias tm="tmux -2 attach-session || tmux -2 new-session" alias wgr="wordgrinder" alias ytmp3="youtube-dl -q -x --audio-format=mp3" @@ -213,6 +212,14 @@ emacsro () { emacs $1 -f view-mode } +tm () { + if tmux list-session 2>/dev/null 1>/dev/null; then + tmux -2 attach-session + else + tmux -2 new-session + fi +} + if [ -x /usr/bin/yum ] && [ ! -x /usr/bin/dnf ]; then alias dnf='yum' fi