X-Git-Url: https://git.madduck.net/etc/tmux.git/blobdiff_plain/cb8596cddf087227d468d145c5890a829682aa3d..663637013aa72d40fba428a08a655e691b5d1ab2:/.bin/tmux diff --git a/.bin/tmux b/.bin/tmux index 3fc4b4f..6a4a360 100755 --- a/.bin/tmux +++ b/.bin/tmux @@ -20,7 +20,7 @@ tmux_session_exists() { _tmux_eval_only=1 real_tmux has-session -t "$1" } -if [ "${1:-}" = --connect-to-last ]; then +if [ "${1:-}" = last ]; then shift if [ -f "$LASTSESSIONIDFILE" ]; then UUID="$(cat $LASTSESSIONIDFILE)" @@ -34,8 +34,11 @@ if [ "${1:-}" = --connect-to-last ]; then echo >&2 W: No tmux session ID stored, generating a new one… fi -elif [ -n "${1:-}" ]; then - real_tmux "$@" +else + case "${1:-;}" in + (\;) :;; + (*) real_tmux "$@";; + esac fi # only without argument create a new session with a random name/id to which we