Fix tmux autostart
This commit is contained in:
parent
44d1ccc82d
commit
4df4bc914f
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
||||||
# Launch tmux if logging in over ssh
|
# Launch tmux if logging in over ssh
|
||||||
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
|
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
|
||||||
exec tmux attach-session -t ssh_tmux || exec tmux new-session -s ssh_tmux
|
if tmux has-session &2>/dev/null; then
|
||||||
|
exec tmux attach-session -t ssh_tmux
|
||||||
|
else
|
||||||
|
exec tmux new-session -s ssh_tmux
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# share history between running zsh instances
|
# share history between running zsh instances
|
||||||
|
|
Loading…
Reference in a new issue