X-Git-Url: https://git.madduck.net/etc/tmux.git/blobdiff_plain/941f9fb60367daa10020590112a49a6bc93c7be5..36fad34880509761263ccc762b51e3dd0bdce506:/.bin/tmux?ds=inline diff --git a/.bin/tmux b/.bin/tmux index 38243a3..93837e0 100755 --- a/.bin/tmux +++ b/.bin/tmux @@ -13,7 +13,9 @@ real_tmux() { single_tmux_session() { local id; id="$1"; shift - real_tmux new -t "$id" "$@" + local flag; flag=t + real_tmux list-sessions | grep -q "^${id}:" || flag=s + real_tmux new -$flag "$id" "$@" } tmux_session_exists() {