X-Git-Url: https://git.madduck.net/etc/tmux.git/blobdiff_plain/b2e928edd9d237d26add5d798d256afd846f3bf6..2c7d137a1d7e58bca2150d3e70b492f8c54c4ffb:/.bin/tmux 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() {