From: martin f. krafft Date: Tue, 31 Mar 2020 21:06:26 +0000 (+0200) Subject: differentiate between -s/-t for new sessions on older clients X-Git-Url: https://git.madduck.net/etc/tmux.git/commitdiff_plain/2c7d137a1d7e58bca2150d3e70b492f8c54c4ffb differentiate between -s/-t for new sessions on older clients --- 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() {