[tmux] Switch client session if it already exists, otherwise attach
parent
7a9eaab91d
commit
6c205561d8
|
@ -14,4 +14,8 @@ if ! tmux has-session -t "${name}" 2> /dev/null; then
|
|||
tmux select-window -t "${name}" -t 0
|
||||
fi;
|
||||
|
||||
tmux attach -t "${name}"
|
||||
if [[ -z "${TMUX} ]]; then
|
||||
tmux attach -t "${name}"
|
||||
else
|
||||
tmux switch-client -t "${name}"
|
||||
fi;
|
||||
|
|
Loading…
Reference in New Issue