1
0
mirror of https://github.com/bertptrs/vimconfig.git synced 2025-12-27 13:30:31 +01:00

Simplify tmux ssh autostart.

This commit is contained in:
Bert Peters
2016-07-20 18:39:10 +02:00
parent 7b920d79f9
commit 76d17a2ad7

View File

@@ -1,13 +1,11 @@
# If connected over SSH and not already in tmux, start tmux. # If connected over SSH and not already in tmux, start tmux.
if [[ -o interactive ]]; then if [[ -o interactive ]] && [[ -n $SSH_TTY ]] && [[ -z $TMUX ]] && hash tmux &> /dev/null; then
if [[ -n $SSH_TTY ]] && [[ -z $TMUX ]] && hash tmux &> /dev/null; then
if tmux has-session &> /dev/null; then if tmux has-session &> /dev/null; then
exec tmux attach exec tmux attach
else else
exec tmux exec tmux
fi fi
fi fi
fi
bindkey -e bindkey -e
# zshrc aliases # zshrc aliases