Make tm a function

This commit is contained in:
Anthony Rose 2020-02-05 17:35:32 +00:00
parent 6987a48f8b
commit 2a73c55a40

View file

@ -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