1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 03:14:55 +02:00

scripts/tmuxs/new.sh: correctly attach to tmux session when outside of tmux.

This commit is contained in:
Henrik Hautakoski 2025-01-05 23:05:24 +01:00
parent e10da228a6
commit 04a6c2cd25

View file

@ -24,5 +24,9 @@ if ! tmux has-session -t=$selected_name 2> /dev/null; then
tmux new-session -ds $selected_name -c $selected
fi
tmux switch-client -t $selected_name
if [[ -z $TMUX ]]; then
tmux attach -t $selected_name
else :
tmux switch-client -t $selected_name
fi