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:
parent
e10da228a6
commit
04a6c2cd25
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue