分享 tmux 快捷方式

在 .bashrc 添加了下面的快捷方式,用不着每次都输入 tmux ... aa() { if tmux has-session -t aa 2>/dev/null; then tmux attach -t aa else tmux new -s aa fi } rr() { if tmux ha...
分享 tmux 快捷方式
分享 tmux 快捷方式

在 .bashrc 添加了下面的快捷方式,用不着每次都输入 tmux ...

aa() {
    if tmux has-session -t aa 2>/dev/null; then
        tmux attach -t aa
    else
        tmux new -s aa
    fi
}
rr() {
    if tmux has-session -t rr 2>/dev/null; then
        tmux attach -t rr
    else
        tmux new -s rr
    fi
}
来源: V2EX - 技术查看原文