mirror of
https://github.com/bertptrs/vimconfig.git
synced 2025-12-27 21:40:31 +01:00
Simplify tmux ssh autostart.
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
# If connected over SSH and not already in tmux, start tmux.
|
||||
if [[ -o interactive ]]; then
|
||||
if [[ -n $SSH_TTY ]] && [[ -z $TMUX ]] && hash tmux &> /dev/null; then
|
||||
if [[ -o interactive ]] && [[ -n $SSH_TTY ]] && [[ -z $TMUX ]] && hash tmux &> /dev/null; then
|
||||
if tmux has-session &> /dev/null; then
|
||||
exec tmux attach
|
||||
else
|
||||
exec tmux
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
bindkey -e
|
||||
# zshrc aliases
|
||||
|
||||
Reference in New Issue
Block a user