Fix tmux autostart
This commit is contained in:
parent
76b50dbe6f
commit
ffba40b027
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
|||
# Launch tmux if logging in over ssh
|
||||
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
|
||||
|
||||
# share history between running zsh instances
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue