+ ktmux_args=${TMUX##*,}
+ if [ "$ktmux_args" = "$TMUX" ]; then
+ ktmux_args=
+ else
+ ktmux_args="-s $ktmux_args"
+ fi
+
+ # tmux 1.8 added -b flag to run-shell. Prior to 1.8 we must detach.
+ tmux_version=$($tmux -V)
+ tmux_version=${tmux_version#tmux }
+ tmux_major=${tmux_version%%.*}
+ tmux_minor=${tmux_version#*.}
+ tmux_minor=${tmux_minor%%.*}
+ tmux_version=$((tmux_minor+tmux_major*10))
+ if [ $tmux_version -lt 18 ]; then
+ $tmux run-shell "ktmux_helper $ktmux_args -R $krenew" ';' detach 2>/dev/null
+ else
+ $tmux run-shell -b "ktmux_helper $ktmux_args -R $krenew" 2>/dev/null
+ fi