aboutsummaryrefslogblamecommitdiff
path: root/bash/bashrc.d/tmux.bash
blob: 8d5382e9846128fc8fe7cb2b1308503c11e23441 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                                          

                          




                                                          
# Attach to existing tmux session rather than create a new one if possible
function tmux {
    if [[ -n "$@" ]]; then
        command tmux "$@"
    else
        command tmux attach -d &>/dev/null || command tmux
    fi
}